Class Utils

java.lang.Object
org.jclouds.filesystem.util.Utils

public class Utils extends Object
Utilities for the filesystem blobstore.
  • Field Details

    • WINDOWS_EVERYONE

      public static final String 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

      public static void deleteRecursively(File file) throws IOException
      Delete a file or a directory recursively.
      Throws:
      IOException
    • delete

      public static void delete(File file) throws IOException
      Throws:
      IOException
    • getWindowsEveryonePrincipalName

      public static final String getWindowsEveryonePrincipalName()
      Returns:
      Localized name for the "Everyone" Windows principal.
    • isPrivate

      public static boolean isPrivate(Path path) throws IOException
      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

      public static void setPrivate(Path path) throws IOException
      Parameters:
      path - Remove "Everyone" from this path's Windows ACL permissions.
      Throws:
      IOException
    • setPublic

      public static void setPublic(Path path) throws IOException
      Parameters:
      path - Add "Everyone" with read enabled to this path's Windows ACL permissions.
      Throws:
      IOException