public class VFS2SnapshotPath extends Object implements org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPath
| Constructor and Description |
|---|
VFS2SnapshotPath(org.apache.commons.vfs2.impl.StandardFileSystemManager manager,
org.apache.commons.vfs2.FileObject fileObject)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
copyFrom(Path srcFile)
Copies file from local destination with two phase copy pattern.
|
boolean |
createDirectories()
Creates directories.
|
void |
createNewFile()
Creates new file.
|
boolean |
delete()
Deletes file.
|
void |
deleteIfEmpty()
Deletes file/folder if empty.
|
boolean |
exists()
Checks that file exists.
|
String |
getAbsolutePath()
Gets absolute path.
|
Collection<org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPath> |
getEntries()
Gets files and folders in this folder.
|
String |
getName()
Gets file name.
|
org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPath |
getParent()
Gets parent.
|
InputStream |
inputStream()
Opens input stream for this file.
|
boolean |
isDirectory()
Checks that this is a folder.
|
boolean |
isEmptyDirectory()
Checks that directory is empty.
|
boolean |
isFile()
Checks that this is a file.
|
long |
length()
Gets file length.
|
OutputStream |
outputStream()
Opens output stream for this file.
|
org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPath |
resolve(String name)
Resolves subfile.
|
@Nullable org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPath |
resolveRegularOrCompressed(String name)
Resolves regular or compressed file (zip, zstd, lz4, etc).
|
org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPath |
resolveSibling(String fileName)
Resolves file in parent folder.
|
void |
sync()
Tries to sync this file.
|
String |
toString() |
public VFS2SnapshotPath(org.apache.commons.vfs2.impl.StandardFileSystemManager manager,
org.apache.commons.vfs2.FileObject fileObject)
public long length()
length in interface org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPathpublic boolean exists()
exists in interface org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPathpublic boolean delete()
delete in interface org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPathtrue if and only if the file or directory is successfully deleted,
false otherwise.public void deleteIfEmpty()
deleteIfEmpty in interface org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPathpublic void createNewFile()
createNewFile in interface org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPathpublic org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPath getParent()
getParent in interface org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPathpublic boolean createDirectories()
createDirectories in interface org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPathtrue if createdpublic org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPath resolve(String name)
resolve in interface org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPathname - Subfile name.@Nullable public @Nullable org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPath resolveRegularOrCompressed(String name)
resolveRegularOrCompressed in interface org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPathname - File name.public boolean isFile()
isFile in interface org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPathtrue only if it is a file.public boolean isDirectory()
isDirectory in interface org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPathtrue only if it is a folder.public boolean isEmptyDirectory()
isEmptyDirectory in interface org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPathtrue only if this is directory and it is empty.public org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPath resolveSibling(String fileName)
resolveSibling in interface org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPathfileName - File name.public OutputStream outputStream()
outputStream in interface org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPathpublic InputStream inputStream()
inputStream in interface org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPathpublic String getName()
getName in interface org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPathpublic String getAbsolutePath()
getAbsolutePath in interface org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPathpublic Collection<org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPath> getEntries()
getEntries in interface org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPathpublic void sync()
sync in interface org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPathpublic void copyFrom(Path srcFile) throws IOException
copyFrom in interface org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPathsrcFile - Local file location.IOException
GridGain In-Memory Computing Platform : ver. 8.9.26 Release Date : October 16 2025