Package net.i2p.util
Class SecureFile
java.lang.Object
java.io.File
net.i2p.util.SecureDirectory
net.i2p.util.SecureFile
- All Implemented Interfaces:
 Serializable,Comparable<File>
Same as SecureDirectory but sets the file mode after createNewFile()
 and createTempFile() also. So just use this instead.
 Probably should have just made this class in the beginning and not had two.
- Since:
 - 0.8.2
 - Author:
 - zzz
 - See Also:
 
- 
Field Summary
Fields inherited from class net.i2p.util.SecureDirectory
isNotWindowsFields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar - 
Constructor Summary
ConstructorsConstructorDescriptionSecureFile(File parent, String child) SecureFile(String pathname) SecureFile(String parent, String child)  - 
Method Summary
Modifier and TypeMethodDescriptionbooleanSets file to mode 600 if the file is createdstatic FilecreateTempFile(String prefix, String suffix) Sets file to mode 600 when the file is createdstatic FilecreateTempFile(String prefix, String suffix, File directory) Sets file to mode 600 when the file is createdprotected voidsetPerms()Tries to set the permissions to 600, ignores errorsMethods inherited from class net.i2p.util.SecureDirectory
mkdir, mkdirsMethods inherited from class java.io.File
canExecute, canRead, canWrite, compareTo, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toString, toURI, toURL 
- 
Constructor Details
- 
SecureFile
 - 
SecureFile
 - 
SecureFile
 
 - 
 - 
Method Details
- 
createNewFile
Sets file to mode 600 if the file is created- Overrides:
 createNewFilein classFile- Throws:
 IOException
 - 
createTempFile
Sets file to mode 600 when the file is created- Throws:
 IOException
 - 
createTempFile
Sets file to mode 600 when the file is created- Throws:
 IOException
 - 
setPerms
protected void setPerms()Tries to set the permissions to 600, ignores errors- Overrides:
 setPermsin classSecureDirectory
 
 -