Package org.frankframework.filesystem
Interface IWritableFileSystem<F>
- Type Parameters:
F
- File representation
- All Superinterfaces:
AutoCloseable
,HasPhysicalDestination
,IBasicFileSystem<F>
- All Known Implementing Classes:
AmazonS3FileSystem
,FtpFileSystem
,LocalFileSystem
,Samba1FileSystem
,Samba2FileSystem
,SftpFileSystem
Extension to
IBasicFileSystem
that can be implemented to allow creation of files and folders.
For writable filesystems, the name of a file can be freely chosen, and:
- moving or copying a file to a folder probably will not change its name
- moving or copying a file to a folder can 'overwrite' a file already present in the folder
To accommodate these situations, for writable filesystems we support overwrite protection and rollover.
This requires that writeableFileSystem.getName() returns the name of the file in the directory, not the full name including the folder name.- Author:
- Gerrit van Brakel
-
Method Summary
Modifier and TypeMethodDescriptionappendFile
(F f) default void
appendFile
(F f, InputStream content) createFile
(F f) default void
createFile
(F file, InputStream content) renameFile
(F source, F destination) Renames the file to a new name, possibly in a another folder.Methods inherited from interface org.frankframework.core.HasPhysicalDestination
getDomain, getPhysicalDestinationName
Methods inherited from interface org.frankframework.filesystem.IBasicFileSystem
close, configure, copyFile, createFolder, deleteFile, exists, folderExists, getAdditionalFileProperties, getCanonicalName, getCanonicalNameOrErrorMessage, getFileSize, getModificationTime, getName, getNumberOfFilesInFolder, getParentFolder, isFolder, isOpen, list, moveFile, open, readFile, removeFolder, toFile, toFile
-
Method Details
-
createFile
- Throws:
FileSystemException
IOException
-
createFile
- Parameters:
file
- FileSystem file referencecontent
- to write or NULL. When NULL existing files should be overwritten, and new files should be created.- Throws:
FileSystemException
IOException
-
appendFile
- Throws:
FileSystemException
IOException
-
appendFile
- Throws:
FileSystemException
IOException
-
renameFile
Renames the file to a new name, possibly in a another folder. Does not need to check for existence of the source or non-existence of the destination.- Throws:
FileSystemException
-