public class JavaSecuredFile extends File
This file catches any SecurityExceptions raised when access to a file is denied and responds as if the file didn't exist instead.
pathSeparator, pathSeparatorChar, separator, separatorChar
Constructor and Description |
---|
JavaSecuredFile(File parent,
String child) |
JavaSecuredFile(String pathname) |
JavaSecuredFile(String parent,
String child) |
JavaSecuredFile(URI uri) |
Modifier and Type | Method and Description |
---|---|
boolean |
canRead() |
boolean |
canWrite() |
boolean |
createNewFile() |
boolean |
delete() |
boolean |
exists() |
File |
getAbsoluteFile() |
File |
getCanonicalFile() |
String |
getCanonicalPath() |
File |
getParentFile() |
boolean |
isDirectory() |
boolean |
isFile() |
boolean |
isHidden() |
long |
lastModified() |
long |
length() |
String[] |
list() |
String[] |
list(FilenameFilter filter) |
File[] |
listFiles() |
File[] |
listFiles(FileFilter filter) |
File[] |
listFiles(FilenameFilter filter) |
boolean |
mkdir() |
boolean |
mkdirs() |
boolean |
renameTo(File dest) |
boolean |
setLastModified(long time) |
boolean |
setReadOnly() |
canExecute, compareTo, createTempFile, createTempFile, deleteOnExit, equals, getAbsolutePath, getFreeSpace, getName, getParent, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, listRoots, setExecutable, setExecutable, setReadable, setReadable, setWritable, setWritable, toPath, toString, toURI, toURL
public JavaSecuredFile(String pathname)
public JavaSecuredFile(URI uri)
public File getParentFile()
getParentFile
in class File
public File getAbsoluteFile()
getAbsoluteFile
in class File
public String getCanonicalPath() throws IOException
getCanonicalPath
in class File
IOException
public File getCanonicalFile() throws IOException
getCanonicalFile
in class File
IOException
public boolean isDirectory()
isDirectory
in class File
public long lastModified()
lastModified
in class File
public boolean createNewFile() throws IOException
createNewFile
in class File
IOException
public String[] list(FilenameFilter filter)
public File[] listFiles(FilenameFilter filter)
public File[] listFiles(FileFilter filter)
public boolean setLastModified(long time)
setLastModified
in class File
public boolean setReadOnly()
setReadOnly
in class File
Copyright © 2015. All Rights Reserved.