Package net.i2p.util

Class SecureDirectory

  • All Implemented Interfaces:
    Serializable, Comparable<File>
    Direct Known Subclasses:
    SecureFile

    public class SecureDirectory
    extends File
    Same as File but sets the file mode after mkdir() so it can be read and written by the owner only (i.e. 700 on linux) As of 0.8.2, just use SecureFile instead of this.
    Since:
    0.8.1
    Author:
    zzz
    See Also:
    Serialized Form
    • Field Detail

      • isNotWindows

        protected static final boolean isNotWindows
    • Constructor Detail

      • SecureDirectory

        public SecureDirectory​(String pathname)
      • SecureDirectory

        public SecureDirectory​(String parent,
                               String child)
      • SecureDirectory

        public SecureDirectory​(File parent,
                               String child)
    • Method Detail

      • mkdir

        public boolean mkdir()
        Sets directory to mode 700 if the directory is created
        Overrides:
        mkdir in class File
      • mkdirs

        public boolean mkdirs()
        Sets directory to mode 700 if the directory is created Does NOT change the mode of other created directories
        Overrides:
        mkdirs in class File
      • setPerms

        protected void setPerms()
        Tries to set the permissions to 700, ignores errors