|
|
|
|
org.eclipse.rse.services.clientserver.archiveutils
Interface ISystemArchiveHandler
-
All Known Implementing Classes:
-
SystemJarHandler,
SystemTarHandler,
SystemTgzHandler,
SystemZipHandler
-
public interface ISystemArchiveHandler
An interface that allows implementing classes to create their own handlers
for various types of archive files, ie: zip, jar, tar, rpm.
Method Summary
|
void
|
add
(
File[] files,
String virtualPath,
String[] names,
ISystemOperationMonitor archiveOperationMonitor)
A generalization of the add method. |
void
|
add
(
File[] files,
String virtualPath,
String[] names,
String[] sourceEncodings,
String[] targetEncodings,
boolean[] isText,
ISystemOperationMonitor archiveOperationMonitor)
A generalization of the add method. |
void
|
add
(
File file,
String virtualPath,
String name,
ISystemOperationMonitor archiveOperationMonitor)
Compresses the file file and adds it to the archive, placing
it in the virtual directory virtualPath . |
void
|
add
(
File file,
String virtualPath,
String name,
String sourceEncoding,
String targetEncoding,
boolean isText,
ISystemOperationMonitor archiveOperationMonitor)
Compresses the file file and adds it to the archive, saving
it in the encoding specified by encoding if the isText is
true. placing it in the virtual directory virtualPath . |
void
|
add
(
File file,
String virtualPath,
String name,
String sourceEncoding,
String targetEncoding,
ISystemFileTypes typeRegistery,
ISystemOperationMonitor archiveOperationMonitor)
Compresses the file file and adds it to the archive, saving
it in the encoding specified by encoding if the isText is
true. placing it in the virtual directory virtualPath . |
void
|
add
(
InputStream stream,
String virtualPath,
String name,
String sourceEncoding,
String targetEncoding,
boolean isText,
ISystemOperationMonitor archiveOperationMonitor)
Compresses the bytes in the InputStream stream and adds them
as an entry to the archive, saving them in the encoding specified by
encoding if isText is true, and placing it in
the virtual directory virtualPath . |
void
|
create
()
Turns the archive that this handler represents into a new, empty archive. |
void
|
createFile
(
String fullVirtualName,
ISystemOperationMonitor archiveOperationMonitor)
Creates a new, empty file in the archive. |
void
|
createFolder
(
String fullVirtualName,
ISystemOperationMonitor archiveOperationMonitor)
Creates a new, empty folder in the archive. |
boolean
|
delete
(
String fullVirtualName,
ISystemOperationMonitor archiveOperationMonitor)
Deletes the entry fullVirtualName from the archive, and
returns whether or not the deletion was successful. |
boolean
|
exists
()
Check if the archive handler implementation associated with this class
exists. |
boolean
|
exists
(
String fullVirtualName,
ISystemOperationMonitor archiveOperationMonitor)
Check whether a given virtual node exists in an archive. |
void
|
extractVirtualDirectory
(
String dir,
File destinationParent,
File destination,
ISystemOperationMonitor archiveOperationMonitor)
Extracts the directory dir (and its children) from the
archive and places the results in the directory
destinationParent . |
void
|
extractVirtualDirectory
(
String dir,
File destinationParent,
File destination,
String sourceEncoding,
boolean isText,
ISystemOperationMonitor archiveOperationMonitor)
Extracts the directory dir (and its children) from the
archive and places the results in the directory
destinationParent . |
void
|
extractVirtualDirectory
(
String dir,
File destinationParent,
ISystemOperationMonitor archiveOperationMonitor)
Extracts the directory dir (and its children) from the
archive and places the results in the directory
destinationParent . |
void
|
extractVirtualDirectory
(
String dir,
File destinationParent,
String sourceEncoding,
boolean isText,
ISystemOperationMonitor archiveOperationMonitor)
Extracts the directory dir (and its children) from the
archive and places the results in the directory
destinationParent . |
void
|
extractVirtualFile
(
String fullVirtualName,
File destination,
ISystemOperationMonitor archiveOperationMonitor)
Extracts the virtual file named fullVirtualName from the
archive, placing the results in destination . |
void
|
extractVirtualFile
(
String fullVirtualName,
File destination,
String sourceEncoding,
boolean isText,
ISystemOperationMonitor archiveOperationMonitor)
Extracts the virtual file named fullVirtualName from the
archive, placing the results in destination . |
void
|
fullRename
(
String fullVirtualName,
String newFullVirtualName,
ISystemOperationMonitor archiveOperationMonitor)
Replaces the full name and path of the entry fullVirtualName
with the new full name and path newFullVirtualName . |
File
|
getArchive
()
Return the archive that this handler deals with. |
String
|
getArchiveComment
()
Get the comment associated with an archive. |
String
|
getClassification
(
String fullVirtualName)
Get the classification for the entry with the given path. |
String
|
getCommentFor
(
String fullVirtualName)
Get the user-defined comment for a specific entry in the archive. |
long
|
getCompressedSizeFor
(
String fullVirtualName)
Get the amount of space taken up by a specific entry in the archive when
it is in compressed form. |
String
|
getCompressionMethodFor
(
String fullVirtualName)
Get the method used to compress a specific entry in the archive. |
File[]
|
getFiles
(
String[] fullNames,
ISystemOperationMonitor archiveOperationMonitor)
Extracts and returns the specified list of virtual files from the
archive. |
long
|
getSizeFor
(
String fullVirtualName)
Return the size for an archive node. |
String
|
getStandardName
(
VirtualChild vc)
Get the archive-type specific standard name for the VirtualChild
vc . |
long
|
getTimeStampFor
(
String fullVirtualName)
Return the timestamp for an archive node. |
VirtualChild[]
|
getVirtualChildFolders
(
String fullVirtualName,
ISystemOperationMonitor archiveOperationMonitor)
Return those children of a specified node in an archive, which are
folders. |
VirtualChild[]
|
getVirtualChildren
(
String fullVirtualName,
ISystemOperationMonitor archiveOperationMonitor)
Return the children of a specified node in an archive. |
VirtualChild[]
|
getVirtualChildrenList
(
ISystemOperationMonitor archiveOperationMonitor)
Return a flat list of entries in an archive. |
VirtualChild[]
|
getVirtualChildrenList
(
String parent,
ISystemOperationMonitor archiveOperationMonitor)
Return a flat list of entries in an archive, whose full paths begin with
the given parent prefix. |
VirtualChild
|
getVirtualFile
(
String fullVirtualName,
ISystemOperationMonitor archiveOperationMonitor)
Return an archive node specified by a given virtual path. |
void
|
move
(
String fullVirtualName,
String destinationVirtualPath,
ISystemOperationMonitor archiveOperationMonitor)
Moves the entry fullVirtualName to the location specified by
destinationVirtualPath , while leaving the entry with the
same name as before. |
void
|
rename
(
String fullVirtualName,
String newName,
ISystemOperationMonitor archiveOperationMonitor)
Renames the entry fullVirtualName to the new name
newName while still leaving the entry in the same virtual
directory. |
void
|
replace
(
String fullVirtualName,
File file,
String name,
ISystemOperationMonitor archiveOperationMonitor)
Compress the file file and replace the virtual file referred
to by fullVirtualName with the compressed file. |
void
|
replace
(
String fullVirtualName,
InputStream stream,
String name,
String sourceEncoding,
String targetEncoding,
boolean isText,
ISystemOperationMonitor archiveOperationMonitor)
Compress the InputStream stream and replace the virtual file
referred to by fullVirtualName with the compressed stream. |
SystemSearchLineMatch[]
|
search
(
String fullVirtualName,
SystemSearchStringMatcher matcher,
ISystemOperationMonitor archiveOperationMonitor)
Search for text within a virtual file in this archive. |
create
void create()
throws
SystemMessageException
- Turns the archive that this handler represents into a new, empty archive.
(The archive could not exist before, in which case this would be a true
creation).
-
-
Throws:
-
SystemMessageException
- in case of an error -
Since:
- org.eclipse.rse.services 3.0
getVirtualChildrenList
VirtualChild[] getVirtualChildrenList(
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Return a flat list of entries in an archive.
-
-
Parameters:
-
archiveOperationMonitor - the operation progress monitor
-
Returns:
- an array containing all the entries in the archive file in a flat
format, where the entries' filenames are prepended by the path to the
entry within the virtual file system. If there are no entries in the
file, returns an array of size 0.
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
getVirtualChildrenList
VirtualChild[] getVirtualChildrenList(
String parent,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Return a flat list of entries in an archive, whose full paths begin with
the given parent prefix.
-
-
Parameters:
-
parent - full path of the parent -
archiveOperationMonitor - the operation progress monitor
-
Returns:
- an array containing all the entries in the archive file in a flat
format, whose full paths begin with the String
parent .
Returns an array of length 0 if there are no such entries.
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
getVirtualChildren
VirtualChild[] getVirtualChildren(
String fullVirtualName,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Return the children of a specified node in an archive.
-
-
Parameters:
-
fullVirtualName - full virtual path of the parent -
archiveOperationMonitor - the operation progress monitor
-
Returns:
- an array containing the virtual children of the virtual directory
named
fullVirtualName . If fullVirtualName is
"", returns the top level in the virtual file system tree. If there are
no values to return, returns null.
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
getVirtualChildFolders
VirtualChild[] getVirtualChildFolders(
String fullVirtualName,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Return those children of a specified node in an archive, which are
folders.
-
-
Parameters:
-
fullVirtualName - full virtual path of the parent -
archiveOperationMonitor - the operation progress monitor
-
Returns:
- an array containing the virtual children of the virtual directory
named
fullVirtualName that are themselves directories. If
fullVirtualName is "", returns the top level of directories
in the virtual file system tree. If there are no values to return,
returns null.
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
getVirtualFile
VirtualChild getVirtualFile(
String fullVirtualName,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Return an archive node specified by a given virtual path.
-
-
Parameters:
-
fullVirtualName - full virtual path of the object to retrieve -
archiveOperationMonitor - the operation progress monitor
-
Returns:
- the virtual File or Folder referred to by
fullVirtualName . This method never returns null. In cases
where the VirtualChild does not physically exist in the archive, this
method returns a new VirtualChild object whose exists() method returns
false.
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
exists
boolean exists(
String fullVirtualName,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Check whether a given virtual node exists in an archive.
-
-
Parameters:
-
fullVirtualName - full virtual path of the object -
archiveOperationMonitor - the operation progress monitor
-
Returns:
- Whether or not the virtual file or folder named
fullVirtualName exists in the archive (physically).
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
exists
boolean exists()
- Check if the archive handler implementation associated with this class
exists.
-
-
Returns:
- Whether or not the handler exists. Usually false if the archive
is corrupted or unreadable.
getArchive
File getArchive()
- Return the archive that this handler deals with.
-
-
Returns:
- the archive that this handler deals with
getTimeStampFor
long getTimeStampFor(
String fullVirtualName)
throws
SystemMessageException
- Return the timestamp for an archive node.
-
-
Parameters:
-
fullVirtualName - virtual path specifying the node to check
-
Returns:
- the current timestamp (last modified) for the archive entry named
fullVirtualName
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation
getSizeFor
long getSizeFor(
String fullVirtualName)
throws
SystemMessageException
- Return the size for an archive node.
-
-
Parameters:
-
fullVirtualName - virtual path specifying the node to check
-
Returns:
- the current size (uncompressed) for the entry in the archive
named
fullVirtualName
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation
extractVirtualFile
void extractVirtualFile(
String fullVirtualName,
File destination,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Extracts the virtual file named
fullVirtualName from the
archive, placing the results in destination .
-
-
Parameters:
-
fullVirtualName - The full path and name of the virtual file in the
archive. -
destination - The destination file for the extracted virtual file. -
archiveOperationMonitor - the operation progress monitor
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
extractVirtualFile
void extractVirtualFile(
String fullVirtualName,
File destination,
String sourceEncoding,
boolean isText,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Extracts the virtual file named
fullVirtualName from the
archive, placing the results in destination . Extracts to the
native encoding, but assumes that the source was archived using
sourceEncoding if isText is true.
-
-
Parameters:
-
fullVirtualName - The full path and name of the virtual file in the
archive. -
destination - The destination file for the extracted virtual file. -
sourceEncoding - The encoding of the file in the archive. -
isText - Whether or not the virtual file is a text file. -
archiveOperationMonitor - the operation progress monitor
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
extractVirtualDirectory
void extractVirtualDirectory(
String dir,
File destinationParent,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Extracts the directory
dir (and its children) from the
archive and places the results in the directory
destinationParent .
-
-
Parameters:
-
dir - The full name of the virtual directory to extract -
destinationParent - A handle to the directory in which the extracted
directory will be placed as a subdirectory. -
archiveOperationMonitor - the operation progress monitor
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
extractVirtualDirectory
void extractVirtualDirectory(
String dir,
File destinationParent,
String sourceEncoding,
boolean isText,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Extracts the directory
dir (and its children) from the
archive and places the results in the directory
destinationParent . Extracts to the native encoding (if
isText ), but assumes that the source was archived using
sourceEncoding .
-
-
Parameters:
-
dir - The full name of the virtual directory to extract -
destinationParent - A handle to the directory in which the extracted
directory will be placed as a subdirectory. -
sourceEncoding - The encoding of the files in the archive. -
isText - Whether or not the files in the directory are text files -
archiveOperationMonitor - the operation progress monitor
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
extractVirtualDirectory
void extractVirtualDirectory(
String dir,
File destinationParent,
File destination,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Extracts the directory
dir (and its children) from the
archive and places the results in the directory
destinationParent . The results will be named
destination.getName() rather than dir 's name.
-
-
Parameters:
-
dir - The full name of the virtual directory to extract -
destinationParent - A handle to the directory in which the extracted
directory will be placed as a subdirectory. -
destination - A handle to the directory that will be created.
Whatever contents are in that directory will be replaced with what
is extracted from the archive. -
archiveOperationMonitor - the operation progress monitor
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
extractVirtualDirectory
void extractVirtualDirectory(
String dir,
File destinationParent,
File destination,
String sourceEncoding,
boolean isText,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Extracts the directory
dir (and its children) from the
archive and places the results in the directory
destinationParent . The results will be named
destination.getName() rather than dir 's name. Extracts to
the native encoding (if isText ), but assumes that the source
was archived using sourceEncoding .
-
-
Parameters:
-
dir - The full name of the virtual directory to extract -
destinationParent - A handle to the directory in which the extracted
directory will be placed as a subdirectory. -
destination - A handle to the directory that will be created.
Whatever contents are in that directory will be replaced with what
is extracted from the archive. -
sourceEncoding - The encoding of the files in the archive. -
isText - Whether or not the files to be extracted in the directory
are all text files -
archiveOperationMonitor - the operation progress monitor
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
add
void add(
File file,
String virtualPath,
String name,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Compresses the file
file and adds it to the archive, placing
it in the virtual directory virtualPath . Pass the name as
the parameter name . If the virtual path does not exist in
the archive, create it. If file is a directory, copy it and
its contents into the archive, maintaining the tree structure.
-
-
Parameters:
-
file - the file to be added to the archive -
virtualPath - the destination of the file -
name - the name of the result virtual file -
archiveOperationMonitor - the operation progress monitor
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
add
void add(
File file,
String virtualPath,
String name,
String sourceEncoding,
String targetEncoding,
boolean isText,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Compresses the file
file and adds it to the archive, saving
it in the encoding specified by encoding if the isText is
true. placing it in the virtual directory virtualPath . Pass
the name as the parameter name . If the virtual path does not
exist in the archive, create it. If file is a directory,
copy it and its contents into the archive, maintaining the tree
structure.
-
-
Parameters:
-
file - the file to be added to the archive -
virtualPath - the destination of the file -
name - the name of the result virtual file -
sourceEncoding - the encoding of the source file -
targetEncoding - the encoding of the result file -
isText - is the file a text file -
archiveOperationMonitor - the operation progress monitor
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
add
void add(
InputStream stream,
String virtualPath,
String name,
String sourceEncoding,
String targetEncoding,
boolean isText,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Compresses the bytes in the InputStream
stream and adds them
as an entry to the archive, saving them in the encoding specified by
encoding if isText is true, and placing it in
the virtual directory virtualPath . Pass the name as the
parameter name . If the virtual path does not exist in the
archive, create it.
-
-
Parameters:
-
stream - the InputStream to be added as an entry to the archive -
virtualPath - the destination of the stream -
name - the name of the result virtual file -
sourceEncoding - the encoding of the source stream -
targetEncoding - the encoding of the result file -
isText - is the file a text file -
archiveOperationMonitor - the operation progress monitor
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
add
void add(
File file,
String virtualPath,
String name,
String sourceEncoding,
String targetEncoding,
ISystemFileTypes typeRegistery,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Compresses the file
file and adds it to the archive, saving
it in the encoding specified by encoding if the isText is
true. placing it in the virtual directory virtualPath . Pass
the name as the parameter name . If the virtual path does not
exist in the archive, create it. If file is a directory,
copy it and its contents into the archive, maintaining the tree
structure.
-
-
Parameters:
-
file - the file to be added to the archive -
virtualPath - the destination of the file -
name - the name of the result virtual file -
sourceEncoding - the encoding of the source file -
targetEncoding - the encoding of the result file -
typeRegistery - file transfer mode (binary or text) of this file -
archiveOperationMonitor - the operation progress monitor
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
add
void add(
File[] files,
String virtualPath,
String[] names,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- A generalization of the add method. Compresses the array of files
files and adds each of them to the archive, placing them in
the virtual directory virtualPath . Pass the names of the
files as the parameter names , where files[i]
has the name names[i] . If the virtual path does not exist in
the archive, create it.
-
-
Parameters:
-
files - the list of files to be added to the archive -
virtualPath - the destination of the file -
names - the names of the result virtual files -
archiveOperationMonitor - the operation progress monitor
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
add
void add(
File[] files,
String virtualPath,
String[] names,
String[] sourceEncodings,
String[] targetEncodings,
boolean[] isText,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- A generalization of the add method. Compresses the array of files
files and adds each of them to the archive, placing them in
the virtual directory virtualPath . Save the i'th file in the
i'th encoding (if isText[i] is true) specified by encodings .
Pass the names of the files as the parameter names , where
files[i] has the name names[i] . If the virtual
path does not exist in the archive, create it.
-
-
Parameters:
-
files - the list of files to be added to the archive -
virtualPath - the destination of the files -
names - the names of the result virtual files -
sourceEncodings - the encoding of the source files -
targetEncodings - the encoding of the result files -
isText - file transfer mode (binary or text) of the files -
archiveOperationMonitor - the operation progress monitor
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
replace
void replace(
String fullVirtualName,
File file,
String name,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Compress the file
file and replace the virtual file referred
to by fullVirtualName with the compressed file. Pass the
name of the file as the parameter name .
-
-
Parameters:
-
fullVirtualName - the path of the file to be replaced -
file - the file to be added to the archive -
name - the name of the file -
archiveOperationMonitor - the operation progress monitor
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
replace
void replace(
String fullVirtualName,
InputStream stream,
String name,
String sourceEncoding,
String targetEncoding,
boolean isText,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Compress the InputStream
stream and replace the virtual file
referred to by fullVirtualName with the compressed stream.
Pass the name of the new entry as the parameter name , the
encoding of the entry as encoding and whether or not the
entry isText or not.
-
-
Parameters:
-
fullVirtualName - the path of the file to be replaced -
stream - the InputStream to be added as an entry to the archive -
name - the name of the result virtual file -
sourceEncoding - the encoding of the source stream -
targetEncoding - the encoding of the result file -
isText - is the file a text file -
archiveOperationMonitor - the operation progress monitor
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
delete
boolean delete(
String fullVirtualName,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Deletes the entry
fullVirtualName from the archive, and
returns whether or not the deletion was successful.
-
-
Parameters:
-
fullVirtualName - the path of the file to be deleted -
archiveOperationMonitor - the operation progress monitor
-
Returns:
-
true if the deletion is successful,
false if the file to delete was not found so this was a
successful no-op.
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
rename
void rename(
String fullVirtualName,
String newName,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Renames the entry
fullVirtualName to the new name
newName while still leaving the entry in the same virtual
directory. Returns true if and only if the rename was successful.
-
-
Parameters:
-
fullVirtualName - the path of the file to be renamed -
archiveOperationMonitor - the operation progress monitor
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
move
void move(
String fullVirtualName,
String destinationVirtualPath,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Moves the entry
fullVirtualName to the location specified by
destinationVirtualPath , while leaving the entry with the
same name as before.
-
-
Parameters:
-
fullVirtualName - the path of the file to be renamed -
destinationVirtualPath - the destination of the file to move to -
archiveOperationMonitor - the operation progress monitor
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
fullRename
void fullRename(
String fullVirtualName,
String newFullVirtualName,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Replaces the full name and path of the entry
fullVirtualName
with the new full name and path newFullVirtualName .
-
-
Parameters:
-
fullVirtualName - the path of the file to be renamed -
newFullVirtualName - the full path of the virtual file name -
archiveOperationMonitor - the operation progress monitor
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
getFiles
File[] getFiles(
String[] fullNames,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Extracts and returns the specified list of virtual files from the
archive.
-
-
Parameters:
-
fullNames - The list of files to return -
archiveOperationMonitor - the operation progress monitor
-
Returns:
- An array of handles to the extracted files. If fullNames has
length 0 then this method returns an array of length 0.
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
createFolder
void createFolder(
String fullVirtualName,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Creates a new, empty folder in the archive. If parent folders do not
exist either, creates them.
-
-
Parameters:
-
fullVirtualName - The full name and path of the new folder within
the virtual file system. -
archiveOperationMonitor - the operation progress monitor
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
createFile
void createFile(
String fullVirtualName,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Creates a new, empty file in the archive. If parent folders do not exist
either, creates them.
-
-
Parameters:
-
fullVirtualName - The full name and path of the new file within the
virtual file system. -
archiveOperationMonitor - the operation progress monitor
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
getStandardName
String getStandardName(
VirtualChild vc)
- Get the archive-type specific standard name for the VirtualChild
vc . For example, for Zip archives, if vc is a directory,
then the standard name must end with a "/".
-
-
Parameters:
-
vc - the archive node to use
-
Returns:
- the standard name for the node
search
SystemSearchLineMatch[] search(
String fullVirtualName,
SystemSearchStringMatcher matcher,
ISystemOperationMonitor archiveOperationMonitor)
throws
SystemMessageException
- Search for text within a virtual file in this archive. A good
implementation will not actually extract the file to disk.
-
-
Parameters:
-
fullVirtualName - the virtual file to search. -
matcher - the pattern matcher to use. -
archiveOperationMonitor - the operation progress monitor
-
Returns:
- an array of match objects corresponding to lines where matches
were found. Returns an empty array if there are no results.
-
Throws:
-
SystemMessageException
- in case of an error,
or SystemOperationCancelledException in case of user cancellation -
Since:
- org.eclipse.rse.services 3.0
getCommentFor
String getCommentFor(
String fullVirtualName)
throws
SystemMessageException
- Get the user-defined comment for a specific entry in the archive.
-
-
Parameters:
-
fullVirtualName - The entry who's comment is desired
-
Returns:
- the comment as a String or "" if there is none
-
Throws:
-
SystemMessageException
- in case of an error
getCompressedSizeFor
long getCompressedSizeFor(
String fullVirtualName)
throws
SystemMessageException
- Get the amount of space taken up by a specific entry in the archive when
it is in compressed form. Compare with getSizeFor(String) which gets the
size of the entry after it is decompressed.
-
-
Parameters:
-
fullVirtualName - The entry who's compressed size is desired
-
Returns:
- the compressed size of the specified entry, or 0 if the entry is
not found. If the archive is not a compression type (ie. tar), return
the same as getSizeFor(String).
-
Throws:
-
SystemMessageException
- in case of an error
getCompressionMethodFor
String getCompressionMethodFor(
String fullVirtualName)
throws
SystemMessageException
- Get the method used to compress a specific entry in the archive.
-
-
Parameters:
-
fullVirtualName - The entry who's compression method is desired
-
Returns:
- The compression method of the specified entry, or "" if none.
-
Throws:
-
SystemMessageException
- in case of an error
getArchiveComment
String getArchiveComment()
throws
SystemMessageException
- Get the comment associated with an archive.
-
-
Returns:
- The comment associated with this archive, or "" if there is none.
-
Throws:
-
SystemMessageException
- in case of an error
getClassification
String getClassification(
String fullVirtualName)
throws
SystemMessageException
- Get the classification for the entry with the given path.
-
-
Parameters:
-
fullVirtualName - the virtual name.
-
Returns:
- the classification.
-
Throws:
-
SystemMessageException
- in case of an error
Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.
|
|
|