This service keeps a list of all the files of interest to the filesystem and will generate notifications of changes to those files to interested listeners.
FileSystemSvc.IAdvanced
FileSystemSvc
Method Summary |
public void |
|
public |
|
public int |
|
public int |
|
public | |
public |
|
public |
|
public |
|
public void |
|
public void |
|
Method Detail |
public void addFileSystemListener(Add a FileSystemListener to a FileSystem. FileSystemChanged events are sent to the listener whenever the listened-to file changes, or is created, or is deleted. For directories, any changes to files inside the directory result in a change event fired on the directory as well. This method populates the file cache asynchronously by default, therefore the listener may receive new file events for files that exist at the time the listener is added if they have not yet been added to the file cache. If the user wants to avoid these events, the listener needs to implement the FileSystemListener.Completion interface. This will be called when the file cache has completed loading the initial state. The listener is then added and will be notified of new files.FileSystemListener
listener,URI
listenTarget)
Related Topics
publicAdd a FileSystemListener to a FileSystem. FileSystemChanged events are sent to the listener whenever the listened-to file changes, or is created, or is deleted. For directories, any changes to files inside the directory result in a change event fired on the directory as well. This method is sychronous and returns the set of files in the system at the time the listener was added. The listener will not receive any "NEW" notifications for these files and is guaranteed to receive notifications for any files not in this list that appear. NOTE: this list will never contain directoriesList
addFileSystemListener(FileSystemListener
listener,URI
listenTarget,IFileFilter
filter)
public int countIFiles(URI
rootURI)
Returns the file count for the files inside the rootURI. It does
not count directories, just files.
public int countIFiles(Returns the file count for the files inside the rootUIR that pass the filter's accept test. It does not count directories, just files.URI
rootURI,IFileFilter
filter)
publicReturns a complete recursive list of all the files below the root passed in. The returned list contains IFiles and does not contain directories. If the directory doesn't exist or contains no files, an empty List is returned.ArrayList
getIFiles(URI
rootDir)
The rootDir URI must use the '/' separator and must end with a '/' character. Use IFile.getURI() to get this automatically.
This list is guaranteed to be complete, meaning the directory structure will be fully scanned before returning the list.
publicReturns a recursive list of all the files below the root passed in, filtered by the IFileFilter. The returned list contains IFiles and does not contain directories. If the directory doesn't exist or contains no files, an empty list is returned.ArrayList
getIFiles(URI
rootDir,IFileFilter
filter)
The rootDir URI must use the '/' separator and must end with a '/' character. Use IFile.getURI() to get this automatically.
This list is guaranteed to be complete, meaning the directory structure will be fully scanned before returning the list.
publicReturns an optionally-recursive list of all the files in the rootDir, filtered byte IFileFilter. The returned list contains IFiles and does not contain directories. If the directory doesn't exist or contains no files, an empty list is returned.ArrayList
getIFiles(URI
rootDir,IFileFilter
filter, boolean recursive)
The rootDir URI must use the '/' separator and must end with a '/' character. Use IFile.getURI() to get this automatically.
This list is guaranteed to be complete, meaning the directory structure will be fully scanned before returning the list.
publicReturns an optionally-recursive list of all the files and directories in the rootDir, filtered byte IFileFilter. If the directory doesn't exist or contains no files, an empty list is returned.ArrayList
getIFilesAndDirs(URI
rootDir,IFileFilter
filter)
The rootDir URI must use the '/' separator and must end with a '/' character. Use IFile.getURI() to get this automatically.
This list is guaranteed to be complete, meaning the directory structure will be fully scanned before returning the list.
This variation of getIFiles does not havea recursive parameter, because it is presumed that the caller is asking for directories so they can do the recursion themselves.
public void removeFileSystemListener(Remove a FileSystemListener for a specific target from a FileSystem.FileSystemListener
listener,URI
listenTarget)
public void removeFileSystemListener(FileSystemListener
listener)
Remove a FileSystemListener from all targets in the FileSystem.
Useful when the listener object is going away entirely.