|
||||||||||
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.FatLfnDirectoryEntry
public final class FatLfnDirectoryEntry
Represents an entry in a FatLfnDirectory
. Besides implementing the
FsDirectoryEntry
interface for FAT file systems, it allows access
to the archive
,
hidden
,
read-only
and
system
flags specifed for the FAT file
system.
Field Summary |
---|
Fields inherited from interface de.waldheinz.fs.FsDirectoryEntry |
---|
DIRECTORY_ENTRY_COMPARATOR |
Method Summary | |
---|---|
long |
getCreated()
Returns the time when this entry was created as ms since 1970. |
FatLfnDirectory |
getDirectory()
Gets the directory this entry refers to. |
FatFile |
getFile()
Gets the file this entry refers to. |
long |
getLastAccessed()
Returns the time when this entry was last accessed as ms since 1970. |
long |
getLastModified()
Gets the last modification time of this entry. |
String |
getName()
Gets the name of this entry. |
FsDirectory |
getParent()
Gets the directory this entry is a part of. |
boolean |
isArchiveFlag()
Returns if this directory entry has the FAT "archive" flag set. |
boolean |
isDirectory()
Is this entry refering to a (sub-)directory? |
boolean |
isDirty()
Indicate if the entry has been modified in memory (ie need to be saved) |
boolean |
isFile()
Is this entry refering to a file? |
boolean |
isHiddenFlag()
Returns if this directory entry has the FAT "hidden" flag set. |
boolean |
isReadOnlyFlag()
Returns if this directory entry has the FAT "read-only" flag set. |
boolean |
isSystemFlag()
Returns if this directory entry has the FAT "system" flag set. |
void |
moveTo(FatLfnDirectory target,
String newName)
Moves this entry to a new directory under the specified name. |
void |
setArchiveFlag(boolean archive)
Sets the "archive" flag on this FatLfnDirectoryEntry to the
specified value. |
void |
setHiddenFlag(boolean hidden)
Sets the "hidden" flag on this FatLfnDirectoryEntry to the
specified value. |
void |
setLastModified(long lastModified)
Sets the last modification time of this entry. |
void |
setName(String newName)
Sets the name of this entry. |
void |
setReadOnlyFlag(boolean readOnly)
Sets the "read only" flag on this FatLfnDirectoryEntry to the
specified value. |
void |
setSystemFlag(boolean systemEntry)
Sets the "system" flag on this FatLfnDirectoryEntry to the
specified value. |
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 boolean isHiddenFlag()
setHiddenFlag(boolean)
public void setHiddenFlag(boolean hidden) throws ReadOnlyException
FatLfnDirectoryEntry
to the
specified value.
hidden
- if this entry should have the hidden flag set
ReadOnlyException
- if this entry is read-onlyisHiddenFlag()
public boolean isSystemFlag()
setSystemFlag(boolean)
public void setSystemFlag(boolean systemEntry) throws ReadOnlyException
FatLfnDirectoryEntry
to the
specified value.
systemEntry
- if this entry should have the system flag set
ReadOnlyException
- if this entry is read-onlyisSystemFlag()
public boolean isReadOnlyFlag()
AbstractFsObject.isReadOnly()
returns true
.
setReadOnlyFlag(boolean)
public void setReadOnlyFlag(boolean readOnly) throws ReadOnlyException
FatLfnDirectoryEntry
to the
specified value. This method only modifies the read-only flag as
specified by the FAT file system, which is essentially ignored by the
fat32-lib. The true indicator if it is possible to alter this
readOnly
- if this entry should be flagged as read only
ReadOnlyException
- if this entry is read-only as given by
AbstractFsObject.isReadOnly()
methodisReadOnlyFlag()
public boolean isArchiveFlag()
public void setArchiveFlag(boolean archive) throws ReadOnlyException
FatLfnDirectoryEntry
to the
specified value.
archive
- if this entry should have the archive flag set
ReadOnlyException
- if this entry is
read-only
public String getName()
FsDirectoryEntry
getName
in interface FsDirectoryEntry
public FsDirectory getParent()
FsDirectoryEntry
getParent
in interface FsDirectoryEntry
null
public void setName(String newName) throws IOException
FsDirectoryEntry
setName
in interface FsDirectoryEntry
newName
- the new name of this entry
IOException
- on error setting the new namepublic void moveTo(FatLfnDirectory target, String newName) throws IOException, ReadOnlyException
target
- the direcrory where this entry should be moved tonewName
- the new name under which this entry will be accessible
in the target directory
IOException
- on error moving this entry
ReadOnlyException
- if this directory is read-onlypublic void setLastModified(long lastModified)
FsDirectoryEntry
setLastModified
in interface FsDirectoryEntry
lastModified
- the new last modification time of this entrypublic FatFile getFile() throws IOException
FsDirectoryEntry
isFile
returns true
.
getFile
in interface FsDirectoryEntry
IOException
- on error accessing the filepublic FatLfnDirectory getDirectory() throws IOException
FsDirectoryEntry
isDirectory
returns true.
getDirectory
in interface FsDirectoryEntry
IOException
- on read errorpublic String toString()
toString
in class Object
public long getLastModified() throws IOException
FsDirectoryEntry
getLastModified
in interface FsDirectoryEntry
0
if this filesystem does not support
getting the last modification time
IOException
- if an error occurs retrieving the time stamppublic long getCreated() throws IOException
FsDirectoryEntry
getCreated
in interface FsDirectoryEntry
IOException
- on error retrieving the time stamppublic long getLastAccessed() throws IOException
FsDirectoryEntry
getLastAccessed
in interface FsDirectoryEntry
IOException
- on error retrieving the last access timepublic boolean isFile()
FsDirectoryEntry
isFile
in interface FsDirectoryEntry
public boolean isDirectory()
FsDirectoryEntry
isDirectory
in interface FsDirectoryEntry
public boolean isDirty()
FsDirectoryEntry
isDirty
in interface FsDirectoryEntry
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |