|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.waldheinz.fs.AbstractFsObject
de.waldheinz.fs.fat.FatLfnDirectory
public final class FatLfnDirectory
The FsDirectory implementation for FAT file systems. This
implementation aims to fully comply to the FAT specification, including
the quite complex naming system regarding the long file names (LFNs) and
their corresponding 8+3 short file names. This also means that an
FatLfnDirectory is case-preserving but not case-sensitive.
| Method Summary | |
|---|---|
FatLfnDirectoryEntry |
addDirectory(String name)
Add a new (sub-)directory with a given name to this directory. According to the FAT file system specification, leading and trailing spaces in the name are ignored by this method. |
FatLfnDirectoryEntry |
addFile(String name)
Add a new file with a given name to this directory. According to the FAT file system specification, leading and trailing spaces in the name are ignored by this method. |
void |
flush()
Save all dirty (unsaved) data to the device. |
FatLfnDirectoryEntry |
getEntry(String name)
Gets the entry with the given name. According to the FAT file system specification, leading and trailing spaces in the name are ignored by this method. |
Iterator<FsDirectoryEntry> |
iterator()
Gets an iterator to iterate over the entries of this directory. |
void |
remove(String name)
Remove the entry with the given name from this directory. |
String |
toString()
|
| Methods inherited from class de.waldheinz.fs.AbstractFsObject |
|---|
checkValid, checkWritable, invalidate, isReadOnly, isValid |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface de.waldheinz.fs.FsObject |
|---|
isReadOnly, isValid |
| Method Detail |
|---|
public FatLfnDirectoryEntry addFile(String name)
throws IOException
Add a new file with a given name to this directory.
According to the FAT file system specification, leading and trailing
spaces in the name are ignored by this method.
addFile in interface FsDirectoryname - the name of the file to add
IOException - on error creating the file
public FatLfnDirectoryEntry addDirectory(String name)
throws IOException
Add a new (sub-)directory with a given name to this directory.
According to the FAT file system specification, leading and trailing
spaces in the name are ignored by this method.
addDirectory in interface FsDirectoryname - the name of the sub-directory to add
IOException - on error creating the directorypublic FatLfnDirectoryEntry getEntry(String name)
Gets the entry with the given name.
According to the FAT file system specification, leading and trailing
spaces in the name are ignored by this method.
getEntry in interface FsDirectoryname - the name of the entry to get
public void flush()
throws IOException
FsDirectory
flush in interface FsDirectoryIOException - on write errorpublic Iterator<FsDirectoryEntry> iterator()
FsDirectory
iterator in interface FsDirectoryiterator in interface Iterable<FsDirectoryEntry>
public void remove(String name)
throws IOException,
IllegalArgumentException
remove in interface FsDirectoryname - the name of the entry to remove
IOException - on error removing the entry
IllegalArgumentException - on an attempt to remove the dot entriespublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||