Class ResourceAttributes

    • Constructor Summary

      Constructors 
      Constructor Description
      ResourceAttributes()
      Creates a new instance of ResourceAttributes.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static ResourceAttributes fromFile​(File file)
      Creates a new resource attributes instance with attributes taken from the specified file in the file system.
      boolean isArchive()
      Returns whether this ResourceAttributes object is marked archive.
      boolean isExecutable()
      Returns whether this ResourceAttributes object is marked executable.
      boolean isHidden()
      Returns whether this ResourceAttributes object is marked hidden.
      boolean isReadOnly()
      Returns whether this ResourceAttributes object is marked read only.
      boolean isSet​(int mask)
      Returns whether this ResourceAttributes object has the given mask set.
      boolean isSymbolicLink()
      Returns whether this ResourceAttributes object is marked as symbolic link.
      void set​(int mask, boolean value)
      Clears all of the bits indicated by the mask.
      void setArchive​(boolean archive)
      Sets or unsets whether this ResourceAttributes object is marked archive.
      void setExecutable​(boolean executable)
      Sets or unsets whether this ResourceAttributes object is marked executable.
      void setHidden​(boolean hidden)
      Sets or unsets whether this ResourceAttributes object is marked hidden
      void setReadOnly​(boolean readOnly)
      Sets or unsets whether this ResourceAttributes object is marked read only.
      void setSymbolicLink​(boolean symLink)
      Sets or unsets whether this ResourceAttributes object is marked as symbolic link.
      String toString()
      Returns a string representation of the attributes, suitable for debugging purposes only.
    • Constructor Detail

      • ResourceAttributes

        public ResourceAttributes()
        Creates a new instance of ResourceAttributes.
    • Method Detail

      • fromFile

        public static ResourceAttributes fromFile​(File file)
        Creates a new resource attributes instance with attributes taken from the specified file in the file system. If the specified file does not exist or is not accessible, this method has the same effect as calling the default constructor.
        Parameters:
        file - The file to get attributes from
        Returns:
        A resource attributes object
      • set

        public void set​(int mask,
                        boolean value)
        Clears all of the bits indicated by the mask.
        Restriction:
        This method is not intended to be referenced by clients.
        Restriction:
        This method is not intended to be re-implemented or extended by clients.
      • isSet

        public boolean isSet​(int mask)
        Returns whether this ResourceAttributes object has the given mask set.
        Restriction:
        This method is not intended to be referenced by clients.
        Restriction:
        This method is not intended to be re-implemented or extended by clients.
      • toString

        public String toString()
        Returns a string representation of the attributes, suitable for debugging purposes only.
        Overrides:
        toString in class Object