|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | 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.
Constructor Summary | |
LocalFileSystem.Impl(LocalFileSystem fs)
Pointer to local filesystem |
Method Summary | |
String[] |
children(String name)
Get a list of children files for a given folder. |
void |
createData(String name)
Create new data file. |
void |
createFolder(String name)
Create new folder. |
void |
delete(String name)
Delete a file. |
boolean |
folder(String name)
Test if the file is a folder or contains data. |
InputStream |
inputStream(String name)
Get input stream. |
Date |
lastModified(String name)
Get last modification time. |
void |
lock(String name)
Lock the file. |
void |
markUnimportant(String name)
Mark the file as being 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)
Rename a file. |
long |
size(String name)
Get the size of the file. |
void |
unlock(String name)
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 filesystem this impl is connected toMethod Detail |
public String[] children(String name)
AbstractFileSystem.List
children
in interface AbstractFileSystem.List
name
- 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
AbstractFileSystem.Change
createFolder
in interface AbstractFileSystem.Change
name
- full name of new folder, e.g. topfolder/newfolder
IOException
- if the operation failspublic void createData(String name) throws IOException
AbstractFileSystem.Change
createData
in interface AbstractFileSystem.Change
name
- full name of the file, e.g. path/from/root/filename.ext
IOException
- if the file cannot be created (e.g. already exists)public void rename(String oldName, String newName) throws IOException
AbstractFileSystem.Change
rename
in interface AbstractFileSystem.Change
oldName
- old name of the file; fully qualifiednewName
- new name of the file; fully qualified
IOException
- if it could not be renamedpublic void delete(String name) throws IOException
AbstractFileSystem.Change
delete
in interface AbstractFileSystem.Change
name
- name of file; fully qualified
IOException
- if the file could not be deletedpublic Date lastModified(String name)
AbstractFileSystem.Info
lastModified
in interface AbstractFileSystem.Info
name
- the file to test
public boolean folder(String name)
AbstractFileSystem.Info
folder
in interface AbstractFileSystem.Info
name
- name of the file
true
if the file is folder, false
if it is datapublic boolean readOnly(String name)
AbstractFileSystem.Info
readOnly
in interface AbstractFileSystem.Info
name
- the file to test
true
if the file is read-onlypublic String mimeType(String name)
AbstractFileSystem.Info
mimeType
in interface AbstractFileSystem.Info
name
- the file to test
"text/plain"
)
or null if no special support for recognizing MIME is implemented.public long size(String name)
AbstractFileSystem.Info
size
in interface AbstractFileSystem.Info
name
- the file to test
public InputStream inputStream(String name) throws FileNotFoundException
AbstractFileSystem.Info
inputStream
in interface AbstractFileSystem.Info
name
- the file to test
FileNotFoundException
- if the file does not exist or is invalidpublic OutputStream outputStream(String name) throws IOException
AbstractFileSystem.Info
outputStream
in interface AbstractFileSystem.Info
name
- the file to test
IOException
- if an error occurs (the file is invalid, etc.)public void lock(String name) throws IOException
AbstractFileSystem.Info
FileLock
within the IDE, however.
lock
in interface AbstractFileSystem.Info
name
- name of the file
IOException
public void unlock(String name)
AbstractFileSystem.Info
unlock
in interface AbstractFileSystem.Info
name
- name of the filepublic void markUnimportant(String name)
AbstractFileSystem.Info
markUnimportant
in interface AbstractFileSystem.Info
name
- the file to mark
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |