public class FileHelper extends Object
| Constructor and Description |
|---|
FileHelper() |
| Modifier and Type | Method and Description |
|---|---|
Path |
atomicFileMoveOrReplace(Path sourceFile,
Path targetFile) |
Path |
createNewFile(File newFile,
String posixFileAttributes) |
Path |
createNewFile(Path newFile,
Set<PosixFilePermission> permissions) |
Path |
createNewFile(Path newFile,
String posixFileAttributes) |
boolean |
isPosixFileSystem(Path path) |
boolean |
isWritableDirectory(String path) |
void |
writeFileSafely(Path targetFile,
BaseAction<File,IOException> operation) |
void |
writeFileSafely(Path targetFile,
Path backupFile,
Path tmpFile,
BaseAction<File,IOException> write) |
public void writeFileSafely(Path targetFile, BaseAction<File,IOException> operation) throws IOException
IOExceptionpublic void writeFileSafely(Path targetFile, Path backupFile, Path tmpFile, BaseAction<File,IOException> write) throws IOException
IOExceptionpublic Path createNewFile(File newFile, String posixFileAttributes) throws IOException
IOExceptionpublic Path createNewFile(Path newFile, String posixFileAttributes) throws IOException
IOExceptionpublic Path createNewFile(Path newFile, Set<PosixFilePermission> permissions) throws IOException
IOExceptionpublic boolean isPosixFileSystem(Path path) throws IOException
IOExceptionpublic Path atomicFileMoveOrReplace(Path sourceFile, Path targetFile) throws IOException
IOExceptionpublic boolean isWritableDirectory(String path)
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.