|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectccs.cpc.VFile
ccs.cpc.impl.DiskVFile
class DiskVFile
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class ccs.cpc.VFile |
|---|
VFile.BasicRSSorter, VFile.ExtnSorter, VFile.NameSorter |
| Field Summary |
|---|
| Fields inherited from class ccs.cpc.VFile |
|---|
hitpoints, isSelected |
| Constructor Summary | |
|---|---|
DiskVFile(java.io.File f,
VDevice vd,
DiskVFile parent)
|
|
| Method Summary | |
|---|---|
java.io.File |
acceptDeferred(java.lang.String leafname)
|
void |
acceptReal(java.lang.String leafname,
ccs.utils.SwappingBuffer data)
Directories: copy this data into yourself, creating a VFile for it. |
boolean |
contains(java.lang.String leafname)
Directories: have you a file called this? |
void |
fileEscaped(java.io.File originalf,
java.io.File usef,
java.lang.Exception e)
Called when FileKiller is unable to complete the process of wiping a file asynchronously. |
VFile |
getContainee(java.lang.String leafname)
Directories: you contain this, we'd like it. |
VFile[] |
getContents()
Directories: your contents please. |
VFileMeta |
getMetadata()
Return metadata for yourself, if available. |
long |
getSize()
Files: return your size, if known, else -1L. |
java.io.File |
getUnderlyingFile()
|
boolean |
isExist()
Does this file still exist? |
boolean |
isRealiseInstant()
For leaf nodes: can you realise a file instantly? |
boolean |
isWritable()
whether this vfile can be updated (i.e. virtualised). |
void |
mkdir(java.lang.String name)
Directories: create this subdir. |
void |
postrecursionHook(boolean isRoot)
Directories: we've finished recursing through you. |
void |
prerecursionHook(boolean isRoot)
Directories: prepare to be recursed through. |
ccs.utils.SwappingBuffer |
realiseAsBuffer()
For leaf nodes, put your data into a SwappingBuffer. |
java.io.File |
realiseAsFile()
For leaf nodes: turn this VFile into a disk File. |
void |
rename(VFile vf,
java.lang.String newname)
Directories: rename the attached VFile to the name given. |
void |
virtualiseFromFile(java.io.File f,
boolean maybeChanged)
For leaf nodes, your contents becomes the contents of the supplied physical file (which is usually an updated form of the result of a realise() earlier). |
void |
virtualiseFromWad(byte[] buf,
boolean maybeChanged)
For leaf nodes, your contents become the contents of the supplied wad. |
void |
wipe(VFile vf)
Directories: wipe this VFile and its contents from the face of the world. |
| Methods inherited from class ccs.cpc.VFile |
|---|
acceptVirtual, createRealiseMonitor, disposeRealiseMonitor, equals, fsanitise, getDecoratedName, getDevice, getDisplayName, getID, getName, getParent, getPath, getTrackingParent, hashCode, hasInternalSeparator, isDir, normaliseName, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
DiskVFile(java.io.File f,
VDevice vd,
DiskVFile parent)
| Method Detail |
|---|
public java.io.File realiseAsFile()
throws java.io.IOException,
ccs.LoseException,
ccs.ArghException
VFilerealiseAsBuffer to suppress redundant copies.
This is an identity operation for DiskVFiles.
realiseAsFile in class VFilejava.io.IOException
ccs.LoseException
ccs.ArghException
public void virtualiseFromFile(java.io.File f,
boolean maybeChanged)
throws java.io.IOException,
ccs.LoseException,
ccs.ArghException
VFile
virtualiseFromFile in class VFilejava.io.IOException
ccs.LoseException
ccs.ArghException
public ccs.utils.SwappingBuffer realiseAsBuffer()
throws java.io.IOException
VFile
realiseAsBuffer in class VFilejava.io.IOExceptionpublic boolean isRealiseInstant()
VFile
isRealiseInstant in class VFile
public void virtualiseFromWad(byte[] buf,
boolean maybeChanged)
throws java.io.IOException
VFile
virtualiseFromWad in class VFilejava.io.IOExceptionpublic boolean isWritable()
VFile
isWritable in class VFile
public long getSize()
throws java.io.IOException
VFilegetMetadata - hopefully this is slightly lighter
weight.
getSize in class VFilejava.io.IOExceptionpublic boolean isExist()
VFile
isExist in class VFile
public boolean contains(java.lang.String leafname)
throws java.io.IOException,
ccs.LoseException,
ccs.ArghException
VFile
contains in class VFilejava.io.IOException
ccs.LoseException
ccs.ArghException
public VFile getContainee(java.lang.String leafname)
throws java.io.IOException
VFile
getContainee in class VFilejava.io.IOException
public VFile[] getContents()
throws java.io.IOException,
ccs.LoseException,
ccs.ArghException
VFile
getContents in class VFilejava.io.IOException
ccs.LoseException
ccs.ArghException
public void mkdir(java.lang.String name)
throws java.io.IOException,
ccs.LoseException,
ccs.ArghException
VFile
mkdir in class VFilejava.io.IOException
ccs.LoseException
ccs.ArghException
public java.io.File acceptDeferred(java.lang.String leafname)
throws java.io.IOException
java.io.IOException
public void acceptReal(java.lang.String leafname,
ccs.utils.SwappingBuffer data)
throws java.io.IOException,
ccs.LoseException,
ccs.ArghException
VFile
acceptReal in class VFilejava.io.IOException
ccs.LoseException
ccs.ArghException
public void wipe(VFile vf)
throws java.io.IOException,
ccs.LoseException,
ccs.ArghException
VFile
wipe in class VFilejava.io.IOException
ccs.LoseException
ccs.ArghException
public void rename(VFile vf,
java.lang.String newname)
throws java.io.IOException,
ccs.LoseException,
ccs.ArghException
VFile
rename in class VFilejava.io.IOException
ccs.LoseException
ccs.ArghException
public VFileMeta getMetadata()
throws java.io.IOException
VFile
getMetadata in class VFilejava.io.IOException
public void fileEscaped(java.io.File originalf,
java.io.File usef,
java.lang.Exception e)
ccs.utils.FileEscapeObserver
fileEscaped in interface ccs.utils.FileEscapeObserveroriginalf - The original filename.usef - The temporary file used during wiping.e - The exception that aborted the wipe..public java.io.File getUnderlyingFile()
public void prerecursionHook(boolean isRoot)
VFile
prerecursionHook in class VFilepublic void postrecursionHook(boolean isRoot)
VFile
postrecursionHook in class VFile
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||