Class PosixPermissionsResetter

java.lang.Object
org.elasticsearch.test.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.
  • Constructor Summary

    Constructors
    Constructor Description
    PosixPermissionsResetter​(java.nio.file.Path path)  
  • 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 Details

    • PosixPermissionsResetter

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

    • 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()