NASA World Wind

gov.nasa.worldwind.cache
Interface FileStore

All Known Implementing Classes:
AbstractFileStore, BasicDataFileStore

public interface FileStore


Field Summary
static String OS_SPECIFIC_DATA_PATH
           
 
Method Summary
 void addLocation(int index, String newPath, boolean isInstall)
           
 void addLocation(String newPath, boolean isInstall)
           
 boolean containsFile(String fileName)
           
 List<? extends DataDescriptor> findAllDataDescriptors()
           
 List<? extends DataDescriptor> findDataDescriptors(String path)
           
 URL findFile(String fileName, boolean checkClassPath)
           
 List<? extends File> getLocations()
           
 File getWriteLocation()
           
 boolean isInstallLocation(String path)
           
 String[] listAllFileNames(String pathName, FileStoreFilter filter)
          Returns an array of strings naming the files discovered under a specified file store path name.
 String[] listFileNames(String pathName, FileStoreFilter filter)
          Returns an array of strings naming the files discovered directly under a specified file store path name.
 String[] listTopFileNames(String pathName, FileStoreFilter filter)
          Returns an array of strings naming the files discovered under a specified file store path name.
 File newFile(String fileName)
           
 void removeFile(URL url)
           
 void removeLocation(String path)
           
 

Field Detail

OS_SPECIFIC_DATA_PATH

static final String OS_SPECIFIC_DATA_PATH
See Also:
Constant Field Values
Method Detail

addLocation

void addLocation(int index,
                 String newPath,
                 boolean isInstall)

addLocation

void addLocation(String newPath,
                 boolean isInstall)

containsFile

boolean containsFile(String fileName)

findAllDataDescriptors

List<? extends DataDescriptor> findAllDataDescriptors()

findDataDescriptors

List<? extends DataDescriptor> findDataDescriptors(String path)

findFile

URL findFile(String fileName,
             boolean checkClassPath)

getLocations

List<? extends File> getLocations()

getWriteLocation

File getWriteLocation()

isInstallLocation

boolean isInstallLocation(String path)

listAllFileNames

String[] listAllFileNames(String pathName,
                          FileStoreFilter filter)
Returns an array of strings naming the files discovered under a specified file store path name. If the path name is null, the entire file store will be searched. Otherwise the file store is recursively searched under the specified path name for files accepted by the specified filter, until the entire path tree is exhausted. This returns null if the path does not exist in the store. Returned names are relative pointers to a file in the store; they are not necessarily a file system path.

Parameters:
pathName - relative path in the file store to search, or null to search the entire file store.
filter - a file filter.
Returns:
an array of file store names. Returns null if the path does not exist in the file store.
Throws:
IllegalArgumentException - if the filter is null.

listFileNames

String[] listFileNames(String pathName,
                       FileStoreFilter filter)
Returns an array of strings naming the files discovered directly under a specified file store path name. If the path name is null, files under the store root are searched. This returns null if the path does not exist in the store. Returned names are relative pointers to a file in the store; they are not necessarily a file system path.

Parameters:
pathName - relative path in the file store to search, or null to search the entire file store.
filter - a file filter.
Returns:
an array of file store names. Returns null if the path does not exist in the file store.
Throws:
IllegalArgumentException - if the filter is null.

listTopFileNames

String[] listTopFileNames(String pathName,
                          FileStoreFilter filter)
Returns an array of strings naming the files discovered under a specified file store path name. If the path name is null, the entire file store will be searched. Otherwise the file store is recursively searched under each branch of the the specified path name until a matching file is found, or that branch is exhausted. Unlinke listAllFileNames(String, FileStoreFilter), This has the effect of locating the top file name under each branch. This returns null if the path does not exist in the store. Returned names are relative pointers to a file in the store; they are not necessarily a file system path.

Parameters:
pathName - relative path in the file store to search, or null to search the entire file store.
filter - a file filter.
Returns:
an array of file store names. Returns null if the path does not exist in the file store.
Throws:
IllegalArgumentException - if the filter is null.

newFile

File newFile(String fileName)

removeFile

void removeFile(URL url)

removeLocation

void removeLocation(String path)

NASA World Wind