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
IOException
public void writeFileSafely(Path targetFile, Path backupFile, Path tmpFile, BaseAction<File,IOException> write) throws IOException
IOException
public Path createNewFile(File newFile, String posixFileAttributes) throws IOException
IOException
public Path createNewFile(Path newFile, String posixFileAttributes) throws IOException
IOException
public Path createNewFile(Path newFile, Set<PosixFilePermission> permissions) throws IOException
IOException
public boolean isPosixFileSystem(Path path) throws IOException
IOException
public Path atomicFileMoveOrReplace(Path sourceFile, Path targetFile) throws IOException
IOException
public boolean isWritableDirectory(String path)
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.