Class PosixPermissionsResetter

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class PosixPermissionsResetter
    extends java.lang.Object
    implements java.lang.AutoCloseable
    Stores the posix attributes for a path and resets them on close.
    • Method Summary

      Modifier and Type Method Description
      void close()  
      java.util.Set<java.nio.file.attribute.PosixFilePermission> getCopyPermissions()  
      void setPermissions​(java.util.Set<java.nio.file.attribute.PosixFilePermission> newPermissions)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PosixPermissionsResetter

        public PosixPermissionsResetter​(java.nio.file.Path path)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.io.IOException
      • setPermissions

        public void setPermissions​(java.util.Set<java.nio.file.attribute.PosixFilePermission> newPermissions)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • getCopyPermissions

        public java.util.Set<java.nio.file.attribute.PosixFilePermission> getCopyPermissions()