|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface VfsNode
Abstract node in a hierarchical filesystem (specifically a Vfs).
This interface encapsulates the behavior common to both VfsFile and VfsDirectory. Many of the search and listing features may return both types, so we need a common supertype to capture that as well.
Copyright 2004-2007 Partner Software, Inc.
| Method Summary | |
|---|---|
boolean |
exists()
Whether the Vfs node exists. |
Path |
getAbsolutePath()
The absolute path to the Vfs node. |
java.lang.String |
getBaseName()
Base name of node; this is the part before the '.' if there's a file extension. |
VfsDirectory |
getDirectory()
The VfsDirectory this node is in, or null if it is the root directory. |
java.lang.String |
getExtension()
File extension (the part after the '.' in most file names; includes the '.'). |
java.lang.String |
getName()
Bare name of node. |
Path |
getPath()
The path to the Vfs node. |
java.net.URI |
getUri()
URI for this VfsNode. |
java.net.URL |
getUrl()
URL for this VfsNode. |
Vfs |
getVfs()
The Vfs this node is in. |
boolean |
isBackup()
True if the file is a backup file - commonly this is based on file name patterns like *~ or *.bak. |
boolean |
isHidden()
True if the file is a hidden file - commonly this is based on the file name starting with a ".". |
void |
make()
Creates the node and any ancestor directories needed to contain it. |
java.io.File |
toFile()
java.io.File for this VfsNode. |
| Method Detail |
|---|
boolean exists()
throws java.io.IOException
make() to create the node if it does not exist.
java.io.IOException - if it can't tell for some reason.
void make()
throws java.io.IOException
java.io.IOException - if it can't.Path getPath()
Path getAbsolutePath()
Vfs getVfs()
VfsDirectory getDirectory()
java.lang.String getName()
java.lang.String getBaseName()
java.lang.String getExtension()
java.net.URL getUrl()
java.net.URI getUri()
java.io.File toFile()
boolean isBackup()
boolean isHidden()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||