Modifier and Type | Class and Description |
---|---|
static interface |
BambooFiles.AutoRemoved |
static interface |
BambooFiles.QuietlyRemoved |
Constructor and Description |
---|
BambooFiles() |
Modifier and Type | Method and Description |
---|---|
static BambooFiles.AutoRemoved |
autoRemoved(Path path)
Wraps the supplied
Path with AutoCloseable . |
static Path |
createTempDirectory(Path dir,
String prefix,
FileAttribute<?>... attrs)
|
static void |
delete(Path path)
Deletes files, including readonly files on Windows.
|
static boolean |
deleteQuietly(Path path)
Deletes a path quietly, returns true on success.
|
static BambooFiles.QuietlyRemoved |
quietlyRemoved(Path path)
Wraps the supplied
Path with AutoCloseable . |
public static boolean deleteQuietly(Path path)
public static void delete(Path path) throws IOException
IOException
public static BambooFiles.AutoRemoved autoRemoved(Path path)
public static BambooFiles.QuietlyRemoved quietlyRemoved(Path path)
Path
with AutoCloseable
. The directory will be quietly deleted on AutoCloseable.close()
public static Path createTempDirectory(Path dir, String prefix, FileAttribute<?>... attrs) throws IOException
Files.createTempDirectory(Path, String, FileAttribute[])
. This function will create the parent directories if they do not exist.IOException
Copyright © 2016 Atlassian Software Systems Pty Ltd. All rights reserved.