Package com.arcadedb.engine
Class FileManager
- java.lang.Object
-
- com.arcadedb.engine.FileManager
-
public class FileManager extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FileManager.FileChange
static class
FileManager.FileManagerStats
-
Constructor Summary
Constructors Constructor Description FileManager(String path, ComponentFile.MODE mode, Set<String> supportedFileExt)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
dropFile(int fileId)
boolean
existsFile(int fileId)
ComponentFile
getFile(int fileId)
List<ComponentFile>
getFiles()
ComponentFile
getOrCreateFile(int fileId, String filePath)
ComponentFile
getOrCreateFile(String fileName, String filePath, ComponentFile.MODE mode)
List<FileManager.FileChange>
getRecordedChanges()
FileManager.FileManagerStats
getStats()
long
getVirtualFileSize(Integer fileId)
int
newFileId()
void
setVirtualFileSize(Integer fileId, long fileSize)
boolean
startRecordingChanges()
Start recording changes in file system.void
stopRecordingChanges()
-
-
-
Constructor Detail
-
FileManager
public FileManager(String path, ComponentFile.MODE mode, Set<String> supportedFileExt)
-
-
Method Detail
-
startRecordingChanges
public boolean startRecordingChanges()
Start recording changes in file system. Changes can be returned (before the end of the lock in database) withgetRecordedChanges()
.- Returns:
- true if the recorded started and false if it was already started.
-
getRecordedChanges
public List<FileManager.FileChange> getRecordedChanges()
-
stopRecordingChanges
public void stopRecordingChanges()
-
close
public void close()
-
dropFile
public void dropFile(int fileId) throws IOException
- Throws:
IOException
-
getVirtualFileSize
public long getVirtualFileSize(Integer fileId) throws IOException
- Throws:
IOException
-
setVirtualFileSize
public void setVirtualFileSize(Integer fileId, long fileSize)
-
getStats
public FileManager.FileManagerStats getStats()
-
getFiles
public List<ComponentFile> getFiles()
-
existsFile
public boolean existsFile(int fileId)
-
getFile
public ComponentFile getFile(int fileId)
-
getOrCreateFile
public ComponentFile getOrCreateFile(String fileName, String filePath, ComponentFile.MODE mode) throws IOException
- Throws:
IOException
-
getOrCreateFile
public ComponentFile getOrCreateFile(int fileId, String filePath) throws IOException
- Throws:
IOException
-
newFileId
public int newFileId()
-
-