Class PathMappedFileManager
- java.lang.Object
-
- org.commonjava.storage.pathmapped.core.PathMappedFileManager
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class PathMappedFileManager extends Object implements Closeable
-
-
Constructor Summary
Constructors Constructor Description PathMappedFileManager(org.commonjava.storage.pathmapped.config.PathMappedStorageConfig config, org.commonjava.storage.pathmapped.spi.PathDB pathDB, org.commonjava.storage.pathmapped.spi.PhysicalStore physicalStore)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidcopy(String fromFileSystem, String fromPath, String toFileSystem, String toPath)booleandelete(String fileSystem, String path)booleanexists(String fileSystem, String path)Map<org.commonjava.storage.pathmapped.spi.FileInfo,Boolean>gc()longgetFileLastModified(String fileSystem, String path)longgetFileLength(String fileSystem, String path)StringgetFileStoragePath(String fileSystem, String path)org.commonjava.storage.pathmapped.model.FilesystemgetFilesystem(String filesystem)Set<String>getFileSystemContaining(Collection<String> candidates, String path)Set<String>getFileSystemContainingDirectory(Collection<String> candidates, String path)Collection<? extends org.commonjava.storage.pathmapped.model.Filesystem>getFilesystems()StringgetFirstFileSystemContaining(List<String> candidates, String path)org.commonjava.storage.pathmapped.spi.PathDBgetPathDB()org.commonjava.storage.pathmapped.model.PathMapgetPathMap(String fileSystem, String path)booleanisDirectory(String fileSystem, String path)booleanisFile(String fileSystem, String path)String[]list(String fileSystem, String path)String[]list(String fileSystem, String path, boolean recursive, int limit)String[]list(String fileSystem, String path, boolean recursive, int limit, org.commonjava.storage.pathmapped.spi.PathDB.FileType fileType)String[]list(String fileSystem, String path, org.commonjava.storage.pathmapped.spi.PathDB.FileType fileType)voidmakeDirs(String fileSystem, String path)InputStreamopenInputStream(String fileSystem, String path)OutputStreamopenOutputStream(String fileSystem, String path)OutputStreamopenOutputStream(String fileSystem, String path, long timeout, TimeUnit timeoutUnit)voidpurgeFilesystem(org.commonjava.storage.pathmapped.model.Filesystem filesystem)
-
-
-
Method Detail
-
getFileSystemContainingDirectory
public Set<String> getFileSystemContainingDirectory(Collection<String> candidates, String path)
-
getFileSystemContaining
public Set<String> getFileSystemContaining(Collection<String> candidates, String path)
-
getFirstFileSystemContaining
public String getFirstFileSystemContaining(List<String> candidates, String path)
-
openInputStream
public InputStream openInputStream(String fileSystem, String path) throws IOException
- Throws:
IOException
-
openOutputStream
public OutputStream openOutputStream(String fileSystem, String path) throws IOException
- Throws:
IOException
-
openOutputStream
public OutputStream openOutputStream(String fileSystem, String path, long timeout, TimeUnit timeoutUnit) throws IOException
- Throws:
IOException
-
list
public String[] list(String fileSystem, String path, org.commonjava.storage.pathmapped.spi.PathDB.FileType fileType)
-
list
public String[] list(String fileSystem, String path, boolean recursive, int limit, org.commonjava.storage.pathmapped.spi.PathDB.FileType fileType)
-
getPathMap
public org.commonjava.storage.pathmapped.model.PathMap getPathMap(String fileSystem, String path)
-
getPathDB
public org.commonjava.storage.pathmapped.spi.PathDB getPathDB()
-
getFilesystem
public org.commonjava.storage.pathmapped.model.Filesystem getFilesystem(String filesystem)
-
getFilesystems
public Collection<? extends org.commonjava.storage.pathmapped.model.Filesystem> getFilesystems()
-
purgeFilesystem
public void purgeFilesystem(org.commonjava.storage.pathmapped.model.Filesystem filesystem)
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-