|
Class: Archiver
Object
|
+--Archiver
|
+--Archiver::CompressedFile
|
+--Archiver::CompressedTarArchive
|
+--Archiver::MultiFileArchive
- Package:
- stx:libbasic2
- Category:
- System-Support-FileFormats
- Version:
- rev:
1.100
date: 2024/04/09 12:14:19
- user: stefan
- file: Archiver.st directory: libbasic2
- module: stx stc-classLibrary: libbasic2
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.
copyrightCOPYRIGHT (c) 2002 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
classAccess
-
arArchive
-
-
gzipArchive
-
-
lzipArchive
-
-
tarArchive
-
-
tarGZipArchive
-
-
zipArchive
-
columns
-
columns
-
** This method must be redefined in concrete classes (subclassResponsibility) **
command strings
-
stringWithQuotedStrings: aColOfStrings
-
used to generate command line arguments;
if aColOfFiles is a non-empty collection,
return them as one space-separated string, with elements quoted, prefixed by a space.
Otherwise return an empty string
commandOutputReader
-
commandOutputParser
-
-
commandOutputParserClass
-
initialization
-
initializeMimeTypeMapping
-
abstract - special handling
instance creation
-
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
|
-
newFor: aFilename
-
instantiate an archiver for the given filename;
will try to extract the mime type from it first
-
with: aFilename
-
queries
-
canAddFiles
-
-
canDragnDrop
-
-
canExtractFiles
-
-
canRemoveFiles
-
-
canViewFile
-
-
hasTitleLine
-
-
isAbstract
-
(comment from inherited method)
Return if this class is an abstract class.
True is returned for Object here; false for subclasses.
Abstract subclasses must redefine this again.
-
numTitleLines
-
accessing
-
errorStream
-
return the value of the instance variable 'errorStream' (automatically generated)
-
errorStream: something
-
set the value of the instance variable 'errorStream' (automatically generated)
-
fileName
-
return the value of the instance variable 'fileName' (automatically generated)
-
fileName: something
-
set the value of the instance variable 'fileName' (automatically generated)
-
outStream
-
return the value of the instance variable 'outStream' (automatically generated)
-
outStream: something
-
set the value of the instance variable 'outStream' (automatically generated)
-
outStream: anOutStream errorStream: anErrorStream synchron: aBoolean
-
-
process
-
return the value of the instance variable 'process' (automatically generated)
-
process: something
-
set the value of the instance variable 'process' (automatically generated)
-
synchron
-
return the value of the instance variable 'synchron' (automatically generated)
-
synchron: something
-
set the value of the instance variable 'synchron' (automatically generated)
-
temporaryDirectory
-
return the value of the instance variable 'temporaryDirectory' (automatically generated)
-
useBuiltinArchiver
-
by default, we use the underlying OS's command line tools to list and extract entries.
However, under windows, if no winrar/rar is installed,
we must use our builtin zip archiver.
This flag is automatically set, if we detect that situation
-
useBuiltinArchiver: aBoolean
-
by default, we use the underlying OS's command line tools to list and extract entries.
However, under windows, if no winrar/rar is installed,
we must use our builtin zip archiver.
This flag is automatically set, if we detect that situation
actions
-
extractFilesTo: aDirectory
-
-
getCommandToListFiles: aColOfFiles
-
** This method must be redefined in concrete classes (subclassResponsibility) **
-
listFiles: aColOfFiles
-
no list command configured/found.
-
removeFilesFromArchive: aColOfFiles
-
** This method must be redefined in concrete classes (subclassResponsibility) **
actions-basic
-
addFilesToArchive: colOfFiles
-
** This method must be redefined in concrete classes (subclassResponsibility) **
-
extractFiles: aColOfFilesOrNil to: aDirectory
-
** This method must be redefined in concrete classes (subclassResponsibility) **
actions-private
-
removeTemporaryDirectory
-
-
stopProcess
-
command execution
-
executeCommand: cmd directory: aDirectory
-
do it lineWise, since outStream may be an ActorStream
-
isValidOutputLine: line
-
return true, if line contains a valid list-files output line
** This method must be redefined in concrete classes (subclassResponsibility) **
-
listFilesReader
-
command strings
-
addDoubleQuotedBaseNames: collectionOfFilenames toStream: aStream
-
-
addDoubleQuotedFilenames: collectionOfFilenames toStream: aStream
-
initialization & release
-
release
-
(comment from inherited method)
remove all references to objects that may refer to self.
Subclasses may redefine this method but should do a 'super release'.
ArArchive
ArchiverOutputParser
BZ2Compressed
CompressedFile
CompressedTarArchive
GZipCompressed
LZipArchive
MultiFileArchive
SevenZipArchive
TarArchive
TarBZ2Archive
TarGZipArchive
XarArchive
ZipArchive
|