|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.File
com.android.io.FolderWrapper
public class FolderWrapper
An implementation of IAbstractFolder
extending File
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.android.io.IAbstractFolder |
---|
IAbstractFolder.FilenameFilter |
Field Summary |
---|
Fields inherited from class java.io.File |
---|
pathSeparator, pathSeparatorChar, separator, separatorChar |
Constructor Summary | |
---|---|
FolderWrapper(java.io.File file)
Creates a new File instance matching a give File object. |
|
FolderWrapper(java.io.File parent,
java.lang.String child)
Creates a new File instance from a parent abstract pathname and a child pathname string. |
|
FolderWrapper(java.lang.String pathname)
Creates a new File instance by converting the given pathname string into an abstract pathname. |
|
FolderWrapper(java.lang.String parent,
java.lang.String child)
Creates a new File instance from a parent abstract pathname and a child pathname string. |
|
FolderWrapper(java.net.URI uri)
Creates a new File instance by converting the given file: URI into an
abstract pathname. |
Method Summary | |
---|---|
boolean |
exists()
Returns whether the resource actually exists. |
IAbstractFile |
getFile(java.lang.String name)
Returns an IAbstractFile representing a child of the current folder with the
given name. |
IAbstractFolder |
getFolder(java.lang.String name)
Returns an IAbstractFolder representing a child of the current folder with the
given name. |
java.lang.String |
getOsLocation()
Returns the OS path of the folder location. |
IAbstractFolder |
getParentFolder()
Returns the parent folder or null if there is no parent. |
boolean |
hasFile(java.lang.String name)
Returns true if the receiver contains a file with a given name |
java.lang.String[] |
list(IAbstractFolder.FilenameFilter filter)
Returns a list of all existing file and directory members in this folder that satisfy the specified filter. |
IAbstractResource[] |
listMembers()
Returns a list of all existing file and directory members in this folder. |
Methods inherited from class java.io.File |
---|
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toString, toURI, toURL |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.android.io.IAbstractResource |
---|
delete, getName |
Constructor Detail |
---|
public FolderWrapper(java.io.File parent, java.lang.String child)
parent
- the parent pathnamechild
- the child nameFile.File(File, String)
public FolderWrapper(java.lang.String pathname)
pathname
- the pathnameFile.File(String)
public FolderWrapper(java.lang.String parent, java.lang.String child)
parent
- the parent pathnamechild
- the child nameFile.File(String, String)
public FolderWrapper(java.net.URI uri)
file:
URI into an
abstract pathname.
uri
- An absolute, hierarchical URI with a scheme equal to "file", a non-empty path
component, and undefined authority, query, and fragment componentsFile.File(URI)
public FolderWrapper(java.io.File file)
File
object.
file
- the file to matchMethod Detail |
---|
public IAbstractResource[] listMembers()
IAbstractFolder
listMembers
in interface IAbstractFolder
public boolean hasFile(java.lang.String name)
IAbstractFolder
hasFile
in interface IAbstractFolder
name
- the name of the file. This is the name without the path leading to the
parent folder.public IAbstractFile getFile(java.lang.String name)
IAbstractFolder
IAbstractFile
representing a child of the current folder with the
given name. The file may not actually exist.
getFile
in interface IAbstractFolder
name
- the name of the file.public IAbstractFolder getFolder(java.lang.String name)
IAbstractFolder
IAbstractFolder
representing a child of the current folder with the
given name. The folder may not actually exist.
getFolder
in interface IAbstractFolder
name
- the name of the folder.public IAbstractFolder getParentFolder()
IAbstractResource
getParentFolder
in interface IAbstractResource
public java.lang.String getOsLocation()
IAbstractResource
getOsLocation
in interface IAbstractResource
public boolean exists()
IAbstractResource
exists
in interface IAbstractResource
exists
in class java.io.File
public java.lang.String[] list(IAbstractFolder.FilenameFilter filter)
IAbstractFolder
list
in interface IAbstractFolder
filter
- A filename filter instance. Must not be null.
File.getName()
).
The array can be empty but is never null.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |