|
S-PLUS Connect/Java v1.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.File
com.insightful.splus.client.ServerFile
Object representing a file on the server, with constructor to specify
information on whether it is a directory.
This was created for use with a JFileChooser. Information on directory
status is stored in the ServerFile to minimize engine queries.
Many methods are not implemented, and throw an
UnsupportedOperationException.
If directory status is not specified in the constructor, it is queried
when isDirectory() is called.
Static booleans are stored indicating whether to check readable, writable,
and exists status, or to just always return true for canRead(), canWrite(),
and canExists(). These were added to suppress unnecessary engine queries
by calls from standard JFileChooser-related classes. They may be set
using setCheckReadable(), setCheckWritable(), setCheckExists().
Field Summary | |
static String |
SERVER_ROOT
|
static int |
SERVER_ROOT_LENGTH
|
Fields inherited from class java.io.File |
pathSeparator, pathSeparatorChar, separator, separatorChar |
Constructor Summary | |
ServerFile(File parent,
String child)
Override the default File constructor and set local variables. |
|
ServerFile(File parent,
String child,
boolean isDir)
Constructor where the directory status is specified. |
|
ServerFile(String pathname)
Override the default File constructor and set local variables. |
|
ServerFile(String pathname,
boolean isDir)
Constructor where the directory status is specified. |
|
ServerFile(String parent,
String child)
Override the default File constructor and set local variables. |
|
ServerFile(String parent,
String child,
boolean isDir)
Constructor where the directory status is specified. |
Method Summary | |
boolean |
canRead()
|
boolean |
canWrite()
|
int |
compareTo(File pathname)
|
static String |
convertServerFilePath(String filePath)
|
boolean |
createNewFile()
|
static File |
createTempFile(String prefix,
String suffix)
|
static File |
createTempFile(String prefix,
String suffix,
File directory)
|
boolean |
delete()
|
void |
deleteOnExit()
|
boolean |
equals(Object obj)
|
boolean |
exists()
|
File |
getAbsoluteFile()
|
String |
getAbsolutePath()
|
File |
getCanonicalFile()
|
String |
getCanonicalPath()
|
String |
getName()
|
String |
getParent()
|
File |
getParentFile()
|
String |
getPath()
|
int |
hashCode()
|
boolean |
isAbsolute()
|
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)
|
static File[] |
listRoots()
|
boolean |
mkdir()
|
boolean |
mkdirs()
|
boolean |
renameTo(File dest)
|
void |
setCanRead(boolean read)
|
void |
setCanWrite(boolean write)
|
static boolean |
setCheckExists(boolean check)
|
static boolean |
setCheckReadable(boolean check)
Method to check whether to do engine queries or just return true. |
static boolean |
setCheckWritable(boolean check)
|
void |
setExists(boolean ex)
|
void |
setIsDir(boolean dir)
|
boolean |
setLastModified(long time)
|
boolean |
setLength(long len)
|
boolean |
setReadOnly()
|
String |
toString()
|
URL |
toURL()
|
Methods inherited from class java.io.File |
compareTo, toURI |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String SERVER_ROOT
public static final int SERVER_ROOT_LENGTH
Constructor Detail |
public ServerFile(String pathname)
public ServerFile(File parent, String child)
public ServerFile(String parent, String child)
public ServerFile(String pathname, boolean isDir)
public ServerFile(File parent, String child, boolean isDir)
public ServerFile(String parent, String child, boolean isDir)
Method Detail |
public static String convertServerFilePath(String filePath)
public void setCanRead(boolean read)
public void setCanWrite(boolean write)
public boolean canRead()
public boolean canWrite()
public int compareTo(File pathname)
public boolean createNewFile()
public static File createTempFile(String prefix, String suffix)
public static File createTempFile(String prefix, String suffix, File directory)
public boolean delete()
public void deleteOnExit()
public boolean equals(Object obj)
public void setExists(boolean ex)
public boolean exists()
public File getAbsoluteFile()
public String getAbsolutePath()
public File getCanonicalFile()
public String getCanonicalPath()
public String getName()
public String getParent()
public File getParentFile()
public String getPath()
public int hashCode()
public boolean isAbsolute()
public void setIsDir(boolean dir)
public boolean isDirectory()
public boolean isFile()
public boolean isHidden()
public long lastModified()
public long length()
public String[] list()
public String[] list(FilenameFilter filter)
public File[] listFiles()
public File[] listFiles(FileFilter filter)
public File[] listFiles(FilenameFilter filter)
public static File[] listRoots()
public boolean mkdir()
public boolean mkdirs()
public boolean renameTo(File dest)
public boolean setLastModified(long time)
public boolean setLength(long len)
public boolean setReadOnly()
public String toString()
public URL toURL()
public static boolean setCheckReadable(boolean check)
check
- indicate whether to actually check the file status
public static boolean setCheckWritable(boolean check)
public static boolean setCheckExists(boolean check)
|
S-PLUS Connect/Java v1.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |