Class FileProtectionUtility


  • public class FileProtectionUtility
    extends Object
    Provides common functionality for protecting files.
    Author:
    Phillip Ross
    • Method Detail

      • chmod0600

        public static void chmod0600​(File file)
                              throws IOException
        Set permissions on the specified file equivalent to file mode 0600. NOTE: This method will only set permissions on files that exist on filesystems which support POSIX file permissions. Manipulation of permissions is silently skipped for filesystems that do not support POSIX file permissions (such as Windows NTFS).
        Parameters:
        file - The file to set permissions on
        Throws:
        IOException - if an I/O error occurs