|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Optional methods for a Stylus Studio custom file system.
A class which implements StylusFileSystem
may implement one or
more of the methods in this interface. The class should not
implement this interface, as new methods may be added to it from
time to time. It is sufficient to provide
implementations for one or more of these methods in the StylusFileSystem
class. Stylus Studio will only call the methods that are present.
Method Summary | |
boolean |
deleteItem(String path)
Delete a file within the custom file system. |
String |
getAdditionalFileExtension()
Get an additional file extension for this custom file system. |
String |
getDefaultFileExtension()
Get the default file extension for this custom file system. |
boolean |
supportsCaseSensitivePathNames()
Return whether pathnames in this custom file system are case sensitive. |
boolean |
supportsDelete()
Return whether this custom file system can delete files. |
Methods inherited from interface com.exln.stylus.io.StylusFileSystem |
buildDirectoryStructure, canChangeServers, canCreateDirectories, connectServer, disconnectServer, exists, getCurrentDirectory, getFileClassName, getName, getScheme, getSeparator, getServerName, getURLForPathName, getVersion, isAbsolute, isDirectory, isPathValid, listRoots, matchesScheme, mkdir, renameTo, resolveShortcuts, setCurrentDirectory, supportsDirectories, supportServer |
Method Detail |
public boolean supportsCaseSensitivePathNames()
true
if pathnames are case sensitive.public String getDefaultFileExtension()
getDefaultFileExtension()
and getAdditionalFileExtension()
allow a custom file system to circumvent this filter.
To do this, you code getDefaultFileExtension to return a string containing
the extension that is the natural extension used by the custom file system, and
you code getAdditionalFileExtension to return a string containing the extension
that Stylus Studio is expecting. This tells Stylus Studio that the two extensions
are functionally equivalent and files with either one should be accepted and shown
to the user.
For example, the SQL Relational DB file system returns files with the
extension .rdbxml for use as .xml files by Stylus Studio. It has this code:
String getDefaultFileExtension() { return ".rdbxml"; }
String getAdditionalFileExtension() { return ".xml"; }
- Returns:
- The default file extension as a lower-case string beginning
with a ".", for example ".rdbxml".
public String getAdditionalFileExtension()
getDefaultFileExtension()
.getDefaultFileExtension()
public boolean supportsDelete()
true
if it can delete files.public boolean deleteItem(String path)
path
- The name of the file to be deleted.
true
if the delete was successful.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |