eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Archiver':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: Archiver


Inheritance:

   Object
   |
   +--Archiver
      |
      +--Archiver::CompressedFile
      |
      +--Archiver::CompressedTarArchive
      |
      +--Archiver::MultiFileArchive

Package:
stx:libbasic2
Category:
System-Support-FileFormats
Version:
rev: 1.65 date: 2019/07/31 15:09:00
user: cg
file: Archiver.st directory: libbasic2
module: stx stc-classLibrary: libbasic2

Description:


this is a soon to be obsoleted helper class for the fileBrowser.
it wraps OS-specific command line archivers (tar, zip, rar, etc)
into a common protocol useful to display an archive's contents.

will be removed - do not use for your projects.


Class protocol:

classAccess
o  arArchive

o  gzipArchive

o  lzipArchive

o  tarArchive

o  tarGZipArchive

o  zipArchive

columns
o  columns

command strings
o  stringWithQuotedFileBaseNames: aColOfFiles

commandOutputReader
o  commandOutputParser

o  commandOutputParserClass

initialization
o  initializeMimeTypeMapping
abstract - special handling

instance creation
o  classForMimeType: aMimeType fileName: aFileNameOrNil
hard coded heuristics...

usage example(s):

     self classForMimeType:nil fileName:nil   
     self classForMimeType:'application/x-tar-compressed' fileName:nil   
     self classForMimeType:'application/x-tar' fileName:nil   
     self classForMimeType:'application/x-foo' fileName:nil   
     self classForMimeType:'application/x-squeak-archive' fileName:nil  
     self classForMimeType:'application/java-archive' fileName:nil 
     'foo.sar' asFilename mimeTypeFromName               
     'foo.jar' asFilename mimeTypeFromName               
     'foo.a' asFilename mimeTypeFromName               

o  newFor: aFilename

o  with: aFilename

queries
o  canAddFiles

o  canDragnDrop

o  canExtractFiles

o  canRemoveFiles

o  canViewFile

o  hasTitleLine

o  isAbstract


Instance protocol:

accessing
o  errorStream
return the value of the instance variable 'errorStream' (automatically generated)

o  errorStream: something
set the value of the instance variable 'errorStream' (automatically generated)

o  fileName
return the value of the instance variable 'fileName' (automatically generated)

o  fileName: something
set the value of the instance variable 'fileName' (automatically generated)

o  outStream
return the value of the instance variable 'outStream' (automatically generated)

o  outStream: something
set the value of the instance variable 'outStream' (automatically generated)

o  outStream: anOutStream errorStream: anErrorStream synchron: aBoolean

o  process
return the value of the instance variable 'process' (automatically generated)

o  process: something
set the value of the instance variable 'process' (automatically generated)

o  synchron
return the value of the instance variable 'synchron' (automatically generated)

o  synchron: something
set the value of the instance variable 'synchron' (automatically generated)

o  temporaryDirectory
return the value of the instance variable 'temporaryDirectory' (automatically generated)

actions
o  extractFilesTo: aDirectory

o  getCommandToListFiles: aColOfFiles

o  listFiles: aColOfFiles

o  removeFilesFromArchive: aColOfFiles

actions-basic
o  addFilesToArchive: colOfFiles

o  extractFiles: aColOfFilesOrNil to: aDirectory

actions-private
o  removeTemporaryDirectory

o  stopProcess

command execution
o  executeCommand: cmd directory: aDirectory
do it lineWise, since outStream may be an ActorStream

o  isValidOutputLine: line
return true, if line contains a valid list-files output line

** This method raises an error - it must be redefined in concrete classes **

o  listFilesReader

command strings
o  addDoubleQuotedFilenames: collectionOfFilenames toStream: aStream

initialization & release
o  release


Private classes:

    ArArchive
    ArchiverOutputParser
    BZ2Compressed
    CompressedFile
    CompressedTarArchive
    GZipCompressed
    LZipArchive
    MultiFileArchive
    TarArchive
    TarBZ2Archive
    TarGZipArchive
    XarArchive
    ZipArchive


ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Fri, 19 Apr 2024 17:24:13 GMT