@Immutable public class FileRelativeIO extends Object implements IMutableFileRelativeIO
IMutableFileRelativeIO.| Constructor and Description |
|---|
FileRelativeIO(File aBasePath,
boolean bCheckAccessRights) |
| Modifier and Type | Method and Description |
|---|---|
com.helger.commons.state.ESuccess |
appendFile(String sFilename,
byte[] aBytes)
Helper function for saving a file with correct error handling.
|
com.helger.commons.state.ESuccess |
appendFile(String sFilename,
String sContent,
Charset aCharset)
Helper function for saving a file with correct error handling.
|
com.helger.commons.io.file.FileIOError |
createDirectory(String sRelativePath,
boolean bRecursive)
Create the appropriate directory if it is not existing
|
com.helger.commons.io.file.FileIOError |
deleteDirectory(File fDir,
boolean bDeleteRecursively) |
com.helger.commons.io.file.FileIOError |
deleteDirectoryIfExisting(File fDir,
boolean bDeleteRecursively) |
com.helger.commons.io.file.FileIOError |
deleteFile(File aFile) |
com.helger.commons.io.file.FileIOError |
deleteFileIfExisting(File aFile) |
boolean |
equals(Object o) |
File |
getBasePathFile() |
protected com.helger.commons.io.file.FileOperationManager |
getFileOperationMgr() |
int |
hashCode() |
com.helger.commons.io.file.FileIOError |
renameDir(String sOldDirName,
String sNewDirName) |
com.helger.commons.io.file.FileIOError |
renameFile(String sOldFilename,
String sNewFilename) |
com.helger.commons.state.ESuccess |
saveFile(String sFilename,
byte[] aBytes)
Helper function for saving a file with correct error handling.
|
com.helger.commons.state.ESuccess |
saveFile(String sFilename,
String sContent,
Charset aCharset)
Helper function for saving a file with correct error handling.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitdeleteDirectory, deleteDirectoryIfExisting, deleteFile, deleteFileIfExisting, getOutputStream, getOutputStream, getWriter, getWriterexistsDir, existsFile, getBasePath, getFile, getRelativeFilename, getResourcegetInputStream, getReader@Nonnull @OverrideOnDemand protected com.helger.commons.io.file.FileOperationManager getFileOperationMgr()
@Nonnull public File getBasePathFile()
getBasePathFile in interface IFileRelativeIOnull.@Nonnull public com.helger.commons.io.file.FileIOError createDirectory(@Nonnull String sRelativePath, boolean bRecursive)
IMutableFileRelativeIOcreateDirectory in interface IMutableFileRelativeIOsRelativePath - the relative pathbRecursive - if true all missing parent directories will be creatednull.IFileRelativeIO.getBasePathFile()@Nonnull public com.helger.commons.io.file.FileIOError deleteFile(@Nonnull File aFile)
deleteFile in interface IMutableFileRelativeIO@Nonnull public com.helger.commons.io.file.FileIOError deleteFileIfExisting(@Nonnull File aFile)
deleteFileIfExisting in interface IMutableFileRelativeIO@Nonnull public com.helger.commons.io.file.FileIOError deleteDirectory(@Nonnull File fDir, boolean bDeleteRecursively)
deleteDirectory in interface IMutableFileRelativeIO@Nonnull public com.helger.commons.io.file.FileIOError deleteDirectoryIfExisting(@Nonnull File fDir, boolean bDeleteRecursively)
deleteDirectoryIfExisting in interface IMutableFileRelativeIO@Nonnull public com.helger.commons.io.file.FileIOError renameFile(@Nonnull String sOldFilename, @Nonnull String sNewFilename)
renameFile in interface IMutableFileRelativeIO@Nonnull public com.helger.commons.io.file.FileIOError renameDir(@Nonnull String sOldDirName, @Nonnull String sNewDirName)
renameDir in interface IMutableFileRelativeIO@Nonnull public com.helger.commons.state.ESuccess saveFile(@Nonnull String sFilename, @Nonnull String sContent, @Nonnull Charset aCharset)
IMutableFileRelativeIOsaveFile in interface IMutableFileRelativeIOsFilename - name of the file. May not be null.sContent - the content to save. May not be null.aCharset - The character set to use. May not be null.ESuccess@Nonnull public com.helger.commons.state.ESuccess saveFile(@Nonnull String sFilename, @Nonnull byte[] aBytes)
IMutableFileRelativeIOsaveFile in interface IMutableFileRelativeIOsFilename - name of the file. May not be null.aBytes - the bytes to be written. May not be null.ESuccess@Nonnull public com.helger.commons.state.ESuccess appendFile(@Nonnull String sFilename, @Nonnull String sContent, @Nonnull Charset aCharset)
IMutableFileRelativeIOappendFile in interface IMutableFileRelativeIOsFilename - name of the file. May not be null.sContent - the content to save. May not be null.aCharset - The character set to use. May not be null.ESuccess@Nonnull public com.helger.commons.state.ESuccess appendFile(@Nonnull String sFilename, @Nonnull byte[] aBytes)
IMutableFileRelativeIOappendFile in interface IMutableFileRelativeIOsFilename - name of the file. May not be null.aBytes - the bytes to be written. May not be null.ESuccessCopyright © 2014–2017 Philip Helger. All rights reserved.