Interface MetaDirectory
public interface MetaDirectory
Provides an abstraction of a virtual directory that holds additional information about the files under vault
control.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Synchronizes and closes this meta directory.voidCreates the internal structures for this meta directory and initializes it with the given path.voiddelete()Deletes the internal structures of this meta directorybooleanexists()Checks if this meta directory already exists on the filesystem.getBaseFile(String name, boolean create) Returns a file from the internal base storage of this directory.Returns the entries that are recorded in this meta directorygetFile()Returns the underlying system file or directory.Returns a file of this meta directory.Returns a file of this meta directory.Returns the repository url defined for this meta directory.getTmpFile(String name, boolean create) Returns a file from the internal temporary storage of this directory.booleanChecks if the file with the given name exists.voidsetRepositoryUrl(String url) Sets the repository url define for this meta directoryvoidsync()Synchronizes any internal changes to this meta directory with the underlying structures.
-
Method Details
-
getFile
File getFile()Returns the underlying system file or directory.- Returns:
- the system file.
-
exists
boolean exists()Checks if this meta directory already exists on the filesystem.- Returns:
trueif this meta directory exists.
-
create
Creates the internal structures for this meta directory and initializes it with the given path.- Parameters:
path- the platform path relative to the jcr_root of this meta directory.- Throws:
IOException- if an I/O error occurs
-
delete
Deletes the internal structures of this meta directory- Throws:
IOException- if an I/O error occurs
-
sync
Synchronizes any internal changes to this meta directory with the underlying structures.- Throws:
IOException- if an I/O error occurs
-
close
Synchronizes and closes this meta directory.- Throws:
IOException- if an I/O error occurs
-
getRepositoryUrl
Returns the repository url defined for this meta directory.- Returns:
- the url or
nullif not defined. - Throws:
IOException- if an I/O error occurs
-
setRepositoryUrl
Sets the repository url define for this meta directory- Parameters:
url- the url- Throws:
IOException- if an I/O error occurs
-
getEntries
Returns the entries that are recorded in this meta directory- Returns:
- the entries.
- Throws:
VltException- if an error during reading of the entries occurrs.
-
getFile
Returns a file of this meta directory.- Parameters:
name- name of the file- Returns:
- the file or
nullif not found - Throws:
IOException- if an I/O error occurs
-
getFile
Returns a file of this meta directory.- Parameters:
name- name of the filecreate- iftruea new file will be created if not exists.- Returns:
- the file or
nullif not found and create isfalse. - Throws:
IOException- if an I/O error occurs
-
getTmpFile
Returns a file from the internal temporary storage of this directory.- Parameters:
name- name of the file.create- iftruea new file will be created if not exists.- Returns:
- the file or
nullif not found and create isfalse. - Throws:
IOException- if an I/O error occurs
-
getBaseFile
Returns a file from the internal base storage of this directory.- Parameters:
name- name of the file.create- iftruea new file will be created if not exists.- Returns:
- the file or
nullif not found and create isfalse. - Throws:
IOException- if an I/O error occurs
-
hasFile
Checks if the file with the given name exists.- Parameters:
name- name of the file.- Returns:
trueif the file exists.- Throws:
IOException- if an I/O error occurs
-