|
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
public class 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 |
|---|
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()
canRead in class Filepublic boolean canWrite()
canWrite in class Filepublic int compareTo(File pathname)
compareTo in interface Comparable<File>compareTo in class Filepublic boolean createNewFile()
createNewFile in class File
public static File createTempFile(String prefix,
String suffix)
public static File createTempFile(String prefix,
String suffix,
File directory)
public boolean delete()
delete in class Filepublic void deleteOnExit()
deleteOnExit in class Filepublic boolean equals(Object obj)
equals in class Filepublic void setExists(boolean ex)
public boolean exists()
exists in class Filepublic File getAbsoluteFile()
getAbsoluteFile in class Filepublic String getAbsolutePath()
getAbsolutePath in class Filepublic File getCanonicalFile()
getCanonicalFile in class Filepublic String getCanonicalPath()
getCanonicalPath in class Filepublic String getName()
getName in class Filepublic String getParent()
getParent in class Filepublic File getParentFile()
getParentFile in class Filepublic String getPath()
getPath in class Filepublic int hashCode()
hashCode in class Filepublic boolean isAbsolute()
isAbsolute in class Filepublic void setIsDir(boolean dir)
public boolean isDirectory()
isDirectory in class Filepublic boolean isFile()
isFile in class Filepublic boolean isHidden()
isHidden in class Filepublic long lastModified()
lastModified in class Filepublic long length()
length in class Filepublic String[] list()
list in class Filepublic String[] list(FilenameFilter filter)
list in class Filepublic File[] listFiles()
listFiles in class Filepublic File[] listFiles(FileFilter filter)
listFiles in class Filepublic File[] listFiles(FilenameFilter filter)
listFiles in class Filepublic static File[] listRoots()
public boolean mkdir()
mkdir in class Filepublic boolean mkdirs()
mkdirs in class Filepublic boolean renameTo(File dest)
renameTo in class Filepublic boolean setLastModified(long time)
setLastModified in class Filepublic boolean setLength(long len)
public boolean setReadOnly()
setReadOnly in class Filepublic String toString()
toString in class Filepublic URL toURL()
toURL in class Filepublic 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 | |||||||