public class LocalFileSystemRepository extends Object implements BackupRepository
BackupRepository.PathType| Constructor and Description | 
|---|
| LocalFileSystemRepository() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | close() | 
| void | copyFileFrom(Directory sourceDir,
            String fileName,
            URI dest)Copy a file from specified  sourceDirto the destination repository (i.e. | 
| void | copyFileTo(URI sourceDir,
          String fileName,
          Directory dest)Copy a file from specified  sourceRepoto the destination directory (i.e. | 
| void | createDirectory(URI path)This method creates a directory at the specified path. | 
| OutputStream | createOutput(URI path)This method returns a OutputStream instance for the specified  path | 
| URI | createURI(String location)This method returns the URI representation for the specified path. | 
| void | deleteDirectory(URI path)This method deletes a directory at the specified path. | 
| boolean | exists(URI path)This method checks if the specified path exists in this repository. | 
| <T> T | getConfigProperty(String name)This method returns the value of the specified configuration property. | 
| BackupRepository.PathType | getPathType(URI path)This method returns the type of a specified path | 
| void | init(NamedList args) | 
| String[] | listAll(URI dirPath)This method returns all the entries (files and directories) in the specified directory. | 
| IndexInput | openInput(URI dirPath,
         String fileName,
         IOContext ctx)This method returns a Lucene input stream reading an existing file. | 
| URI | resolve(URI baseUri,
       String... pathComponents)This method resolves a URI using the specified path components (as method arguments). | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBackupLocationpublic void init(NamedList args)
init in interface NamedListInitializedPluginpublic <T> T getConfigProperty(String name)
BackupRepositorygetConfigProperty in interface BackupRepositorypublic URI createURI(String location)
BackupRepositorycreateURI in interface BackupRepositorylocation - The path specified by the user.public URI resolve(URI baseUri, String... pathComponents)
BackupRepositoryresolve in interface BackupRepositorybaseUri - The base URI to use for creating the pathpathComponents - The directory (or file-name) to be included in the URI.public void createDirectory(URI path) throws IOException
BackupRepositorycreateDirectory in interface BackupRepositorypath - The path where the directory needs to be created.IOException - in case of errorspublic void deleteDirectory(URI path) throws IOException
BackupRepositorydeleteDirectory in interface BackupRepositorypath - The path referring to the directory to be deleted.IOException - in case of errorspublic boolean exists(URI path) throws IOException
BackupRepositoryexists in interface BackupRepositorypath - The path whose existence needs to be checked.IOException - in case of errorspublic IndexInput openInput(URI dirPath, String fileName, IOContext ctx) throws IOException
BackupRepositoryopenInput in interface BackupRepositorydirPath - The parent directory of the file to be readfileName - The name of the file to be readctx - the Lucene IO contextIOException - in case of errorspublic OutputStream createOutput(URI path) throws IOException
BackupRepositorypathcreateOutput in interface BackupRepositorypath - The path for which OutputStream needs to be createdpathIOException - in case of errorspublic String[] listAll(URI dirPath) throws IOException
BackupRepositorylistAll in interface BackupRepositorydirPath - The directory pathIOException - in case of errorspublic BackupRepository.PathType getPathType(URI path) throws IOException
BackupRepositorygetPathType in interface BackupRepositorypath - The path whose type needs to be checked.IOException - in case of errorspublic void copyFileFrom(Directory sourceDir, String fileName, URI dest) throws IOException
BackupRepositorysourceDir to the destination repository (i.e. backup).copyFileFrom in interface BackupRepositorysourceDir - The source directory hosting the file to be copied.fileName - The name of the file to by copieddest - The destination backup location.IOException - in case of errorspublic void copyFileTo(URI sourceDir, String fileName, Directory dest) throws IOException
BackupRepositorysourceRepo to the destination directory (i.e. restore).copyFileTo in interface BackupRepositorysourceDir - The source URI hosting the file to be copied.fileName - The name of the file to by copieddest - The destination where the file should be copied.IOException - in case of errors.public void close()
           throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.