java.io.Serializable, AbstractFileSystem.Change, AbstractFileSystem.Info, AbstractFileSystem.List, AbstractFileSystem.SymlinkInfopublic static class LocalFileSystem.Impl extends java.lang.Object implements AbstractFileSystem.List, AbstractFileSystem.Info, AbstractFileSystem.SymlinkInfo, AbstractFileSystem.Change
| Constructor | Description |
|---|---|
Impl(LocalFileSystem fs) |
Pointer to local filesystem
|
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String[] |
children(java.lang.String name) |
Get a list of children files for a given folder.
|
void |
createData(java.lang.String name) |
Create new data file.
|
void |
createFolder(java.lang.String name) |
Create new folder.
|
void |
delete(java.lang.String name) |
Delete a file.
|
boolean |
folder(java.lang.String name) |
Test if the file is a folder or contains data.
|
java.lang.String |
getCanonicalName(java.lang.String name) |
Get canonical file name (resolve all symbolic links).
|
java.io.InputStream |
inputStream(java.lang.String name) |
Get input stream.
|
boolean |
isSymbolicLink(java.lang.String name) |
Check whether a file represents a symbolic link.
|
java.util.Date |
lastModified(java.lang.String name) |
Get last modification time.
|
void |
lock(java.lang.String name) |
Lock the file.
|
void |
markUnimportant(java.lang.String name) |
Mark the file as being unimportant.
|
java.lang.String |
mimeType(java.lang.String name) |
Get the MIME type of the file.
|
java.io.OutputStream |
outputStream(java.lang.String name) |
Get output stream.
|
boolean |
readOnly(java.lang.String name) |
Test whether this file can be written to or not.
|
java.lang.String |
readSymbolicLink(java.lang.String name) |
Read symbolic link.
|
void |
rename(java.lang.String oldName,
java.lang.String newName) |
Rename a file.
|
long |
size(java.lang.String name) |
Get the size of the file.
|
void |
unlock(java.lang.String name) |
Unlock the file.
|
public Impl(LocalFileSystem fs)
fs - the filesystem this impl is connected topublic java.lang.String[] children(java.lang.String name)
AbstractFileSystem.Listchildren in interface AbstractFileSystem.Listname - the folder, by name; e.g. top/next/afterthatfile.ext (no path)
the array can contain null values that will be ignoredpublic void createFolder(java.lang.String name)
throws java.io.IOException
AbstractFileSystem.ChangecreateFolder in interface AbstractFileSystem.Changename - full name of new folder, e.g. topfolder/newfolderjava.io.IOException - if the operation failspublic void createData(java.lang.String name)
throws java.io.IOException
AbstractFileSystem.ChangecreateData in interface AbstractFileSystem.Changename - full name of the file, e.g. path/from/root/filename.extjava.io.IOException - if the file cannot be created (e.g. already exists)public void rename(java.lang.String oldName,
java.lang.String newName)
throws java.io.IOException
AbstractFileSystem.Changerename in interface AbstractFileSystem.ChangeoldName - old name of the file; fully qualifiednewName - new name of the file; fully qualifiedjava.io.IOException - if it could not be renamedpublic void delete(java.lang.String name)
throws java.io.IOException
AbstractFileSystem.Changedelete in interface AbstractFileSystem.Changename - name of file; fully qualifiedjava.io.IOException - if the file could not be deletedpublic java.util.Date lastModified(java.lang.String name)
AbstractFileSystem.InfolastModified in interface AbstractFileSystem.Infoname - the file to testpublic boolean folder(java.lang.String name)
AbstractFileSystem.Infofolder in interface AbstractFileSystem.Infoname - name of the filetrue if the file is folder, false if it is datapublic boolean readOnly(java.lang.String name)
AbstractFileSystem.InforeadOnly in interface AbstractFileSystem.Infoname - the file to testtrue if the file is read-onlypublic java.lang.String mimeType(java.lang.String name)
AbstractFileSystem.InfomimeType in interface AbstractFileSystem.Infoname - the file to test"text/plain")
or null if no special support for recognizing MIME is implemented.public long size(java.lang.String name)
AbstractFileSystem.Infosize in interface AbstractFileSystem.Infoname - the file to testpublic java.io.InputStream inputStream(java.lang.String name)
throws java.io.FileNotFoundException
AbstractFileSystem.InfoinputStream in interface AbstractFileSystem.Infoname - the file to testjava.io.FileNotFoundException - if the file does not exist or is invalidpublic java.io.OutputStream outputStream(java.lang.String name)
throws java.io.IOException
AbstractFileSystem.InfooutputStream in interface AbstractFileSystem.Infoname - the file to testjava.io.IOException - if an error occurs (the file is invalid, etc.)public void lock(java.lang.String name)
throws java.io.IOException
AbstractFileSystem.InfoFileLock within NetBeans, however.lock in interface AbstractFileSystem.Infoname - name of the filejava.io.IOException - (e.g. FileAlreadyLockedException) if the file is already locked or otherwise cannot be lockedpublic void unlock(java.lang.String name)
AbstractFileSystem.Infounlock in interface AbstractFileSystem.Infoname - name of the filepublic void markUnimportant(java.lang.String name)
AbstractFileSystem.InfomarkUnimportant in interface AbstractFileSystem.Infoname - the file to markpublic boolean isSymbolicLink(java.lang.String name)
throws java.io.IOException
AbstractFileSystem.SymlinkInfoisSymbolicLink in interface AbstractFileSystem.SymlinkInfoname - Name of the file.java.io.IOException - If some I/O problem occurs.AbstractFileSystem.SymlinkInfo.readSymbolicLink(java.lang.String),
AbstractFileSystem.SymlinkInfo.getCanonicalName(java.lang.String)public java.lang.String readSymbolicLink(java.lang.String name)
throws java.io.IOException
AbstractFileSystem.SymlinkInfoIllegalArgumentException can be thrown.
This method does not perform any normalization. If the target of
symbolic link is defined using relative path, this relative path will
be returned.readSymbolicLink in interface AbstractFileSystem.SymlinkInfoname - Name of the file.name does not represent symbolic
link.java.io.IOException - If some I/O problem occurs.AbstractFileSystem.SymlinkInfo.isSymbolicLink(java.lang.String)public java.lang.String getCanonicalName(java.lang.String name)
throws java.io.IOException
AbstractFileSystem.SymlinkInfogetCanonicalName in interface AbstractFileSystem.SymlinkInfoname - Name of the file.name and
where all symbolic links are resolved.java.io.IOException - If some I/O problem occurs.Built on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.