|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openide.filesystems.LocalFileSystem.Impl
The implementation class that implements List, Info and Change interfaces and delegates all the methods to appropriate methods of LocalFileSystem.
Fields inherited from interface org.openide.filesystems.AbstractFileSystem.List |
serialVersionUID |
Fields inherited from interface org.openide.filesystems.AbstractFileSystem.Info |
serialVersionUID |
Fields inherited from interface org.openide.filesystems.AbstractFileSystem.Change |
serialVersionUID |
Constructor Summary | |
LocalFileSystem.Impl(LocalFileSystem fs)
Pointer to local file system |
Method Summary | |
String[] |
children(String name)
Scans children for given name |
void |
createData(String name)
Create new data file. |
void |
createFolder(String name)
Creates new folder named name. |
void |
delete(String name)
Delete the file. |
boolean |
folder(String name)
Test if the file is folder or contains data. |
InputStream |
inputStream(String name)
Get input stream. |
Date |
lastModified(String name)
Get last modification time. |
void |
lock(String name)
Does nothing to lock the file. |
void |
markUnimportant(String name)
Does nothing to mark the file as unimportant. |
String |
mimeType(String name)
Get the MIME type of the file. |
OutputStream |
outputStream(String name)
Get output stream. |
boolean |
readOnly(String name)
Test whether this file can be written to or not. |
void |
rename(String oldName,
String newName)
Renames a file. |
long |
size(String name)
Get the size of the file. |
void |
unlock(String name)
Does nothing to unlock the file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LocalFileSystem.Impl(LocalFileSystem fs)
fs
- the file system this impl is connected toMethod Detail |
public String[] children(String name)
children
in interface AbstractFileSystem.List
org.openide.filesystems.AbstractFileSystem.List
f
- the folder, by name; e.g. top/next/afterthat
file.ext
(no path)
the array can contain null
values that will be ignoredpublic void createFolder(String name) throws IOException
createFolder
in interface AbstractFileSystem.Change
name
- name of folderIOException
- if operation failspublic void createData(String name) throws IOException
createData
in interface AbstractFileSystem.Change
name
- name of the fileIOException
- if the file cannot be created (e.g. already exists)public void rename(String oldName, String newName) throws IOException
rename
in interface AbstractFileSystem.Change
oldName
- old name of the filenewName
- new name of the filepublic void delete(String name) throws IOException
delete
in interface AbstractFileSystem.Change
name
- name of fileIOException
- if the file could not be deletedpublic Date lastModified(String name)
lastModified
in interface AbstractFileSystem.Info
name
- the file to testpublic boolean folder(String name)
folder
in interface AbstractFileSystem.Info
name
- name of the filepublic boolean readOnly(String name)
readOnly
in interface AbstractFileSystem.Info
name
- the file to testtrue
if file is read-onlypublic String mimeType(String name)
FileUtil.getMIMEType(java.lang.String)
.mimeType
in interface AbstractFileSystem.Info
name
- the file to test"text/plain"
public long size(String name)
size
in interface AbstractFileSystem.Info
name
- the file to testpublic InputStream inputStream(String name) throws FileNotFoundException
inputStream
in interface AbstractFileSystem.Info
name
- the file to testFileNotFoundException
- if the file does not exists or is invalidpublic OutputStream outputStream(String name) throws IOException
outputStream
in interface AbstractFileSystem.Info
name
- the file to testIOException
- if an error occures (the file is invalid, etc.)public void lock(String name) throws IOException
lock
in interface AbstractFileSystem.Info
name
- name of the filepublic void unlock(String name)
unlock
in interface AbstractFileSystem.Info
name
- name of the filepublic void markUnimportant(String name)
markUnimportant
in interface AbstractFileSystem.Info
name
- the file to mark
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |