public class Utils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
deleteRecursively(File file)
Delete a file or a directory recursively.
|
static boolean |
isPrivate(java.nio.file.Path path) |
static boolean |
isWindows()
Determine if Java is running on a windows OS
|
static void |
setPrivate(java.nio.file.Path path) |
static void |
setPublic(java.nio.file.Path path) |
public static void deleteRecursively(File file) throws IOException
IOException
public static boolean isWindows()
public static boolean isPrivate(java.nio.file.Path path) throws IOException
path
- The path to a Windows file or directory.IOException
public static void setPrivate(java.nio.file.Path path) throws IOException
path
- Remove "Everyone" from this path's Windows ACL permissions.IOException
public static void setPublic(java.nio.file.Path path) throws IOException
path
- Add "Everyone" with read enabled to this path's Windows ACL permissions.IOException
Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.