Class AbstractVirtualFileSystem
java.lang.Object
net.thevpc.common.vfs.impl.AbstractVirtualFileSystem
- All Implemented Interfaces:
VirtualFileSystem
- Direct Known Subclasses:
AbstractDelegateVirtualFileSystem, NativeVFS
- Author:
- taha.bensalah@gmail.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidcopyTo(String inFile, VFile outFile, VFileFilter filter) copyToNativeTempFile(String inFile) createTempFile(String prefix, String suffix, String folder) voidfilter(VFileFilter fileFilter) filter(VFileFilter fileFilter, String fsId) getId()getParentFile(String file) VFile[]getRoots()booleanisParentOf(String parent, String child) VFile[]protected VFilestatic StringnormalizeVirtualPath(String path) probeContentType(String path, boolean bestEffort) byte[]voidcreates a sub fs with random generated fsIdtoNativeFile(String vpath) toNativePath(String vpath) static StringtoPathString(List<String> r) toPathString(List<String> r, int fromIndex, int toIndex) toVirtualPath(String jpath) voidwrite(String path, InputStream stream) voidwriteBytes(String path, byte[] bytes) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface VirtualFileSystem
delete, exists, getACL, getBase, getFileType, getInputStream, getOutputStream, getOutputStream, getSecurityManager, isDirectory, isFile, lastModified, length, listFiles, mkdir, mkdirs
-
Constructor Details
-
AbstractVirtualFileSystem
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceVirtualFileSystem
-
toPathString
-
isParentOf
- Specified by:
isParentOfin interfaceVirtualFileSystem
-
toPathString
-
normalizeVirtualPath
-
getParentFile
- Specified by:
getParentFilein interfaceVirtualFileSystem
-
get
- Specified by:
getin interfaceVirtualFileSystem
-
write
- Specified by:
writein interfaceVirtualFileSystem- Throws:
IOException
-
listFiles
- Specified by:
listFilesin interfaceVirtualFileSystem
-
toNativeFile
-
toNativePath
-
toVirtualPath
-
createTempFile
- Specified by:
createTempFilein interfaceVirtualFileSystem
-
renameTo
- Specified by:
renameToin interfaceVirtualFileSystem- Throws:
IOException
-
copyTo
- Specified by:
copyToin interfaceVirtualFileSystem- Throws:
IOException
-
copyTo
- Specified by:
copyToin interfaceVirtualFileSystem- Throws:
IOException
-
copyFrom
- Specified by:
copyFromin interfaceVirtualFileSystem- Throws:
IOException
-
copyTo
- Specified by:
copyToin interfaceVirtualFileSystem- Throws:
IOException
-
get
- Specified by:
getin interfaceVirtualFileSystem
-
subfs
Description copied from interface:VirtualFileSystemcreates a sub fs with random generated fsId- Specified by:
subfsin interfaceVirtualFileSystem- Parameters:
path-- Returns:
-
subfs
- Specified by:
subfsin interfaceVirtualFileSystem
-
filter
- Specified by:
filterin interfaceVirtualFileSystem- Parameters:
fileFilter-- Returns:
-
filter
- Specified by:
filterin interfaceVirtualFileSystem
-
readBytes
- Specified by:
readBytesin interfaceVirtualFileSystem- Throws:
IOException
-
writeBytes
- Specified by:
writeBytesin interfaceVirtualFileSystem- Throws:
IOException
-
probeContentType
- Specified by:
probeContentTypein interfaceVirtualFileSystem- Throws:
IOException
-
deleteAll
- Specified by:
deleteAllin interfaceVirtualFileSystem- Throws:
IOException
-
copyToNativeTempFile
- Specified by:
copyToNativeTempFilein interfaceVirtualFileSystem- Throws:
IOException
-
getRoots
- Specified by:
getRootsin interfaceVirtualFileSystem
-
newFile
-