public class PathUtil extends Object
Constructor and Description |
---|
PathUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canWrite(Path path) |
static Path |
create(Path root,
String createMe) |
static Path |
create(String first,
String... more) |
static Path |
create(URI uri) |
static InputStream |
createInputStream(Path path,
OpenOption... options) |
static boolean |
createNewFile(Path file,
FileAttribute... attrs) |
static OutputStream |
createOutputStream(Path path,
OpenOption... options) |
static BufferedReader |
createReader(Path file) |
static BufferedWriter |
createWriter(Path path) |
static void |
delete(Path path) |
static void |
delete(Path path,
boolean bRecursive) |
static boolean |
exists(Path path,
LinkOption... options) |
static String |
findToolsJar() |
static Path |
getAbsolutePath(Path path) |
static Path |
getAbsolutePath(String path) |
static String |
getAbsolutePathName(Path path) |
static String |
getAbsolutePathName(String path) |
static String |
getName(Path path) |
static boolean |
isDirectory(Path fileOrDir,
LinkOption... options) |
static boolean |
isFile(Path path,
LinkOption... options) |
static long |
lastModified(Path path,
LinkOption... options) |
static Path[] |
listFiles(Path path) |
static boolean |
mkdir(Path copy,
FileAttribute... attrs) |
static boolean |
mkdirs(Path path) |
static boolean |
renameTo(Path from,
Path to,
CopyOption... options) |
static boolean |
setWritable(Path file,
boolean bWritable) |
public static boolean mkdirs(Path path)
public static boolean mkdir(Path copy, FileAttribute... attrs)
public static boolean isFile(Path path, LinkOption... options)
public static boolean isDirectory(Path fileOrDir, LinkOption... options)
public static String findToolsJar()
public static boolean createNewFile(Path file, FileAttribute... attrs)
public static BufferedReader createReader(Path file)
public static BufferedWriter createWriter(Path path)
public static OutputStream createOutputStream(Path path, OpenOption... options)
public static InputStream createInputStream(Path path, OpenOption... options)
public static void delete(Path path)
public static void delete(Path path, boolean bRecursive)
public static boolean exists(Path path, LinkOption... options)
public static long lastModified(Path path, LinkOption... options)
public static boolean renameTo(Path from, Path to, CopyOption... options)
public static boolean canWrite(Path path)
public static boolean setWritable(Path file, boolean bWritable)
Copyright © 2024. All rights reserved.