F
- Representation of file and folder.public interface IBasicFileSystem<F> extends HasPhysicalDestination
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
configure() |
F |
copyFile(F f,
String destinationFolder,
boolean createFolder,
boolean resultantMustBeReturned)
Copies the file to a another folder.
|
void |
createFolder(String folder) |
void |
deleteFile(F f) |
boolean |
exists(F f) |
boolean |
folderExists(String folder) |
Map<String,Object> |
getAdditionalFileProperties(F f) |
String |
getCanonicalName(F f) |
long |
getFileSize(F f) |
Date |
getModificationTime(F f) |
String |
getName(F f)
Get a string representation of an identification of a file.
|
int |
getNumberOfFilesInFolder(String folder) |
String |
getParentFolder(F f) |
boolean |
isOpen() |
DirectoryStream<F> |
listFiles(String folder)
Lists all files in 'folder' or in the 'root' of the filesystem (when folder is null).
|
F |
moveFile(F f,
String destinationFolder,
boolean createFolder,
boolean resultantMustBeReturned)
Moves the file to a another folder.
|
void |
open() |
Message |
readFile(F f,
String charset) |
void |
removeFolder(String folder,
boolean removeNonEmptyFolder) |
F |
toFile(String filename)
Get a file 'F' representation of an identification of a file.
|
F |
toFile(String defaultFolder,
String filename)
Creates a reference to a file.
|
getDomain, getPhysicalDestinationName
void configure() throws ConfigurationException
ConfigurationException
void open() throws FileSystemException
FileSystemException
void close() throws FileSystemException
FileSystemException
boolean isOpen()
DirectoryStream<F> listFiles(String folder) throws FileSystemException
FileSystemException
int getNumberOfFilesInFolder(String folder) throws FileSystemException
FileSystemException
String getName(F f)
toFile(String)
.
Can reflect name a file has in its folder, is not expected to be unique over folders.String getParentFolder(F f) throws FileSystemException
FileSystemException
F toFile(@Nonnull String filename) throws FileSystemException
getName(Object)
.FileSystemException
F toFile(String defaultFolder, @Nonnull String filename) throws FileSystemException
FileSystemException
boolean exists(F f) throws FileSystemException
FileSystemException
boolean folderExists(String folder) throws FileSystemException
FileSystemException
Message readFile(F f, String charset) throws FileSystemException, IOException
FileSystemException
IOException
void deleteFile(F f) throws FileSystemException
FileSystemException
F moveFile(F f, String destinationFolder, boolean createFolder, boolean resultantMustBeReturned) throws FileSystemException
resultantMustBeReturned
is set, then an Exception must be thrown, preferably before the file is moved;resultantMustBeReturned
is not set, then a null result returned might also mean the file was moved successfully, but with unknown destination;resultantMustBeReturned
- TODOFileSystemException
F copyFile(F f, String destinationFolder, boolean createFolder, boolean resultantMustBeReturned) throws FileSystemException
resultantMustBeReturned
is set, then an Exception must be thrown, preferably before the file is copied;resultantMustBeReturned
is not set, then a null result returned might also mean the file was copied successfully, but with unknown destination;resultantMustBeReturned
- TODOFileSystemException
void createFolder(String folder) throws FileSystemException
FileSystemException
void removeFolder(String folder, boolean removeNonEmptyFolder) throws FileSystemException
FileSystemException
long getFileSize(F f) throws FileSystemException
FileSystemException
String getCanonicalName(F f) throws FileSystemException
FileSystemException
Date getModificationTime(F f) throws FileSystemException
FileSystemException
Map<String,Object> getAdditionalFileProperties(F f) throws FileSystemException
FileSystemException
Copyright © 2023 Frank!Framework. All rights reserved.