public class BambooPathUtils extends Object
Path
s
Any change to this class should pass a full suite of Apache Commons IO unit tests.
See https://extranet.atlassian.com/display/BAMBOO/Testing+BambooPathUtils+against+Apache+Commons+IO+unit+tests for detailsConstructor and Description |
---|
BambooPathUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
cleanDirectory(Path directoryToCleanOrSymlink) |
static void |
deleteDirectory(Path path) |
static boolean |
deleteQuietly(Path path) |
static void |
forceDelete(Path path) |
static void |
setReadOnly(Path file)
s
|
static Path |
toPath(File file) |
static Path |
toRealPathIfNeeded(Path maybeSymlink)
Returns a fully dereferenced path (including hardlinks) if the supplied argument is a symlink.
|
static void |
writeStringToFile(Path file,
String data,
Charset charset) |
public static boolean deleteQuietly(@Nullable Path path)
FileUtils.deleteQuietly(File)
public static void cleanDirectory(@NotNull Path directoryToCleanOrSymlink) throws IOException
IOException
FileUtils.cleanDirectory(File)
public static void deleteDirectory(@NotNull Path path) throws IOException
IOException
FileUtils.deleteDirectory(File)
public static void forceDelete(@NotNull Path path) throws IOException
IOException
FileUtils.forceDelete(File)
public static Path toRealPathIfNeeded(@NotNull Path maybeSymlink) throws IOException
IOException
public static void writeStringToFile(Path file, String data, Charset charset) throws IOException
IOException
FileUtils#writeStringToFile(File, String, Charset)}
public static void setReadOnly(Path file)
Copyright © 2016 Atlassian Software Systems Pty Ltd. All rights reserved.