public interface ModelStorage
Modifier and Type | Method and Description |
---|---|
boolean |
exists(String path)
Returns
true if a regular file or directory exist, otherwise false . |
byte[] |
getFile(String path)
Returns file content.
|
FileStat |
getFileStat(String path)
Returns statistics for file.
|
boolean |
isDirectory(String path)
Returns
true if the specified path associated with a directory. |
boolean |
isFile(String path)
Returns
true if the specified path associated with a regular file. |
Set<String> |
listFiles(String path)
Returns list of files in the specified directory.
|
<T> T |
lockPaths(Supplier<T> supplier,
String... paths)
Locks paths in model storage and call passed method.
|
default void |
mkdir(String path)
Creates directory.
|
void |
mkdir(String path,
boolean onlyIfNotExist)
Creates directory.
|
void |
mkdirs(String path)
Creates directory and all required parent directories in the path.
|
default void |
putFile(String path,
byte[] data)
Creates a new or replaces existing file.
|
void |
putFile(String path,
byte[] data,
boolean onlyIfNotExist)
Creates a new or replaces existing file.
|
void |
remove(String path)
Removes specified directory or file.
|
void putFile(String path, byte[] data, boolean onlyIfNotExist)
path
- Path to file.data
- File content.onlyIfNotExist
- If file already exists throw an exception.default void putFile(String path, byte[] data)
path
- Path to file.data
- File content.byte[] getFile(String path)
path
- Path to file.void mkdir(String path, boolean onlyIfNotExist)
path
- Path to directory.onlyIfNotExist
- If directory already exists throw an exception.default void mkdir(String path)
path
- Path to directory.void mkdirs(String path)
path
- Path to directory.Set<String> listFiles(String path)
path
- Path to directory.void remove(String path)
path
- Path to directory or file.boolean exists(String path)
true
if a regular file or directory exist, otherwise false
.path
- Path to directory or file.true
if a regular file or directory exist, otherwise false
.boolean isDirectory(String path)
true
if the specified path associated with a directory.path
- Path to directory or file.true
if the specified path associated with a directory.boolean isFile(String path)
true
if the specified path associated with a regular file.path
- Path to directory or file.true
if the specified path associated with a regular file.FileStat getFileStat(String path)
path
- Path to directory or file.
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024