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 TypeMethodDescriptionvoidappendFile(F file, InputStream content) voidcreateFile(F file, InputStream content) renameFile(F source, F destination) Renames the file to a new name, possibly in another folder.Methods inherited from interface org.frankframework.core.HasPhysicalDestination
getPhysicalDestinationNameMethods 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, list, moveFile, open, readFile, removeFolder, toFile, toFile
-
Method Details
-
createFile
- Parameters:
file- FileSystem file referencecontent- to write or NULL. When NULL existing files should be overwritten, and new files should be created.- Throws:
FileSystemExceptionIOException
-
appendFile
- Throws:
FileSystemExceptionIOException
-
renameFile
Renames the file to a new name, possibly in another folder. Does not need to check for the existence of the source or non-existence of the destination.- Throws:
FileSystemException
-