|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectccs.cdb.CDBFilesystem
public class CDBFilesystem
Commonly-useful utility methods for manipulating CDB filesystems (sets of
CDBFile s indexed by CDBDirectorys). It's OK
to read CDBFiles directly. However, it is strongly recommended that you
use this to write to a CDB filesystem; don't try to do it yourself, it's
harder than it looks.
| Method Summary | |
|---|---|
static void |
delete(CDBeeTree cdb,
CDBFile cf)
Delete the specified CDBFile and update its parent folder. |
static void |
delTree(CDBeeTree cdb,
CDBDirectory folder,
BeeTreeObserver obs)
Delete the entire tree rooted at the specified folder, including the folder itself. |
static CDBFileMeta |
getFileMeta(CDBeeTree cdb,
java.lang.String path)
Return the metadata according to a given file. |
static boolean |
hasFilesystem(CDBeeTree cdb,
boolean needMetadata)
Whether this CDB contains a filesystem. |
static void |
insert(CDBeeTree cdb,
CDBFile cf)
Insert a CDBFile, updating and / or creating intervening folders. |
static void |
insert(CDBeeTree cdb,
CDBFile cf,
CDBDirectory parent)
Optimised version of insert for situations where the destination CDBDirectory is already available. |
static CDBDirectory |
mkdirs(CDBeeTree cdb,
java.lang.String path)
Return the CDBDirectory corresponding to the specified path, creating it and / or any parent folders as required. |
static void |
rename(CDBeeTree cdb,
CDBFile cf,
java.lang.String newName)
Rename the specified CDBFile and update its parent folder. |
static void |
renameFolder(CDBeeTree cdb,
CDBDirectory folder,
java.lang.String newName)
Renames a folder. |
static void |
update(CDBeeTree cdb,
CDBFile cf)
Update an existing CDBFile. |
static void |
verifyFilesystem(CDBeeTree cdb)
Verify that a valid CDB filesystem exists, and create it if not. |
static void |
verifyLegacyFilesystem(CDBeeTree cdb)
as verifyFilesystem, except that the result is compatible
with Checkpoint 5 installations. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void verifyFilesystem(CDBeeTree cdb)
throws java.io.IOException
cdb - The CDB to work on.
java.io.IOException - If thrown by the CDBeeTree.
public static void verifyLegacyFilesystem(CDBeeTree cdb)
throws java.io.IOException
verifyFilesystem, except that the result is compatible
with Checkpoint 5 installations. Subsequent calls to methods on this
class will work either way. This may be deprecated in future.
java.io.IOException
public static boolean hasFilesystem(CDBeeTree cdb,
boolean needMetadata)
throws java.io.IOException
cdb - needMetadata - Whether the filesystem must have metadata support
(new in Checkpoint 6) in order to qualify.
java.io.IOException
public static void insert(CDBeeTree cdb,
CDBFile cf)
throws java.io.IOException
cdb - The CDB to insert into.cf - The CDBFile to insert. Must be fully initialised and ready to
insert.
java.io.IOException - If thrown by the CDBeeTree.
public static void insert(CDBeeTree cdb,
CDBFile cf,
CDBDirectory parent)
throws java.io.IOException
cdb - The CDB to insert into.cf - The CDBFile to insert. Must be fully initialised and ready to
insert.parent - The CDBDirectory to add this file to. This must
be the correct directory, or Bad Things will happen.
java.io.IOException - If thrown by the CDBeeTree.
public static void update(CDBeeTree cdb,
CDBFile cf)
throws java.io.IOException
cdb - The CDB to update into.cf - The CDBFile to update. Must be fully initialised and ready to
insert.
java.io.IOException - If thrown by the CDBeeTree.
public static CDBFileMeta getFileMeta(CDBeeTree cdb,
java.lang.String path)
throws java.io.IOException
cdb - The CDB to look in.path - The path to the file in question.
java.io.IOException - If thrown by the CDBeeTree.
public static CDBDirectory mkdirs(CDBeeTree cdb,
java.lang.String path)
throws java.io.IOException
cdb - The CDB to insert into.path - The path to insert.
java.io.IOException - If thrown by the CDBeeTree.
public static void delete(CDBeeTree cdb,
CDBFile cf)
throws java.io.IOException
cdb - The CDB to work on.cf - The CDBFile to delete. This needs a correct internal path
but need not have been initialised any further.
java.io.IOException - If thrown by the CDBeeTree.
public static void rename(CDBeeTree cdb,
CDBFile cf,
java.lang.String newName)
throws java.io.IOException
cdb - The CDB to work on.cf - The CDBFile to rename. This needs a correct internal path
but need not have been initialised any further.newName - the new name (terminal path element) of the file.
java.io.IOException - If thrown by the CDBeeTree.
public static void delTree(CDBeeTree cdb,
CDBDirectory folder,
BeeTreeObserver obs)
throws java.io.IOException
cdb - The CDB to work on.folder - The folder to delete. This needs a correct path but need
not have been initialised any further. If root, all files and folders
will be deleted but the now-empty root folder will be replaced afterwards.obs - If not null, this will be notified as the deletion progresses.
(Deleting CDBFiles involves wiping them, and takes time).
java.io.IOException - If thrown by the CDBeeTree.
public static void renameFolder(CDBeeTree cdb,
CDBDirectory folder,
java.lang.String newName)
throws java.io.IOException
cdb - The CDB to work on.folder - The folder to rename. Cannot be the root folder.newName - The new name (terminal) element of the path.
java.io.IOException - If thrown by the CDBeeTree.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||