Package org.jclouds.filesystem.util
Class Utils
java.lang.Object
org.jclouds.filesystem.util.Utils
Utilities for the filesystem blobstore.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic void
static void
deleteRecursively
(File file) Delete a file or a directory recursively.static final String
static boolean
isMacOSX()
Determine if Java is running on a Mac OSstatic boolean
static boolean
Determine if Java is running on a windows OSstatic void
setPrivate
(Path path) static void
-
Field Details
-
WINDOWS_EVERYONE
-
-
Method Details
-
isMacOSX
public static boolean isMacOSX()Determine if Java is running on a Mac OS -
isWindows
public static boolean isWindows()Determine if Java is running on a windows OS -
deleteRecursively
Delete a file or a directory recursively.- Throws:
IOException
-
delete
- Throws:
IOException
-
getWindowsEveryonePrincipalName
- Returns:
- Localized name for the "Everyone" Windows principal.
-
isPrivate
- Parameters:
path
- The path to a Windows file or directory.- Returns:
- true if path has permissions set to Everyone on windows. The exact permissions are not checked.
- Throws:
IOException
-
setPrivate
- Parameters:
path
- Remove "Everyone" from this path's Windows ACL permissions.- Throws:
IOException
-
setPublic
- Parameters:
path
- Add "Everyone" with read enabled to this path's Windows ACL permissions.- Throws:
IOException
-