dmlite
0.6
|
Interface for Catalog (Namespaces). More...
#include <catalog.h>
Public Member Functions | |
virtual | ~Catalog () |
Destructor. More... | |
virtual void | changeDir (const std::string &path) |
virtual std::string | getWorkingDir (void) |
virtual ExtendedStat | extendedStat (const std::string &path, bool followSym=true) |
virtual DmStatus | extendedStat (ExtendedStat &xstat, const std::string &path, bool followSym=true) |
virtual ExtendedStat | extendedStatByRFN (const std::string &rfn) |
virtual bool | access (const std::string &path, int mode) |
virtual bool | accessReplica (const std::string &replica, int mode) |
virtual void | addReplica (const Replica &replica) |
virtual void | deleteReplica (const Replica &replica) |
virtual std::vector< Replica > | getReplicas (const std::string &path) |
virtual void | symlink (const std::string &path, const std::string &symlink) |
virtual std::string | readLink (const std::string &path) |
virtual void | unlink (const std::string &path) |
virtual void | create (const std::string &path, mode_t mode) |
virtual mode_t | umask (mode_t mask) |
virtual void | setMode (const std::string &path, mode_t mode) |
virtual void | setOwner (const std::string &path, uid_t newUid, gid_t newGid, bool followSymLink=true) |
virtual void | setSize (const std::string &path, size_t newSize) |
virtual void | setChecksum (const std::string &path, const std::string &csumtype, const std::string &csumvalue) |
virtual void | getChecksum (const std::string &path, const std::string &csumtype, std::string &csumvalue, const std::string &pfn, const bool forcerecalc=false, const int waitsecs=0) |
virtual void | setAcl (const std::string &path, const Acl &acl) |
virtual void | utime (const std::string &path, const struct utimbuf *buf) |
virtual std::string | getComment (const std::string &path) |
virtual void | setComment (const std::string &path, const std::string &comment) |
virtual void | setGuid (const std::string &path, const std::string &guid) |
virtual void | updateExtendedAttributes (const std::string &path, const Extensible &attr) |
virtual Directory * | openDir (const std::string &path) |
virtual void | closeDir (Directory *dir) |
virtual struct dirent * | readDir (Directory *dir) |
virtual ExtendedStat * | readDirx (Directory *dir) |
virtual void | makeDir (const std::string &path, mode_t mode) |
virtual void | rename (const std::string &oldPath, const std::string &newPath) |
virtual void | removeDir (const std::string &path) |
virtual Replica | getReplicaByRFN (const std::string &rfn) |
virtual void | updateReplica (const Replica &replica) |
![]() | |
virtual | ~BaseInterface () |
Virtual destructor. More... | |
virtual std::string | getImplId (void) const =0 throw () |
String ID of the implementation. More... | |
Additional Inherited Members | |
![]() | |
virtual void | setStackInstance (StackInstance *si) |
virtual void | setSecurityContext (const SecurityContext *ctx) |
Set the security context. More... | |
![]() | |
static void | setStackInstance (BaseInterface *i, StackInstance *si) |
These method allows plugins to call other plugins setStackInstance and setSecurityContext. More... | |
static void | setSecurityContext (BaseInterface *i, const SecurityContext *ctx) |
Interface for Catalog (Namespaces).
|
virtual |
Destructor.
|
virtual |
Checks wether the process would be allowed to read, write, or check existence.
lfn | Logical filename. |
mode | A mask consisting of one or more of R_OK, W_OK, X_OK and F_OK. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Checks wether the process would be allowed to read, write, or check existence.
rfn | Replica filename. |
mode | A mask consisting of one or more of R_OK, W_OK, X_OK and F_OK. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Add a new replica for a file.
replica | Stores the data that is going to be added. fileid must point to the id of the logical file in the catalog. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Change the working dir. Future not-absolute paths will use this as root.
path | The new working dir. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Close a directory opened previously.
dir | The directory handle as returned by NsInterface::openDir. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Creates an entry in the catalog.
path | The new file. |
mode | The creation mode. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Delete a replica.
replica | The replica to remove. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Do an extended stat of a file or directory.
path | The path of the file or directory. |
followSym | If true, symlinks will be followed. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Do an extended stat of a file or directory. Exception-safe version, returns a status
path | The path of the file or directory. |
followSym | If true, symlinks will be followed. |
xstat | The extended status of the file. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Do an extended stat of a logical file using an associated replica file name.
rfn | The replica. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Get the checksum of a file, eventually waiting for it to be calculated.
path | The file to query |
csumtype | The checksum type (CS, AD or MD. We can also pass a long checksum name (e.g. checksum.adler32)). |
csumvalue | The checksum value. |
forcerecalc | Force recalculation of the checksum (may take long and throw EAGAIN) |
waitsecs | Seconds to wait for a checksum to be calculated. Throws EAGAIN if timeouts. Set to 0 for blocking behavior. |
Reimplemented in dmlite::DummyCatalog.
|
virtual |
Get the comment associated with a file.
path | The file or directory. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Get a replica.
rfn | The replica file name. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Get replicas for a file.
path | The file for which replicas will be retrieved. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Get the current working dir.
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Create a new empty directory.
path | The path of the new directory. |
mode | The creation mode. |
Reimplemented in dmlite::DummyCatalog, and dmlite::BuiltInCatalog.
|
virtual |
Open a directory for reading.
path | The directory to open. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Read next entry from a directory (simple read).
dir | The directory handle as returned by NsInterface::openDir. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Read next entry from a directory (stat information added).
dir | The directory handle as returned by NsInterface::openDir. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Returns the path pointed by the symlink path
path | The symlink file. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Remove a directory.
path | The path of the directory to remove. |
Reimplemented in dmlite::DummyCatalog, and dmlite::BuiltInCatalog.
|
virtual |
Rename a file or directory.
oldPath | The old name. |
newPath | The new name. |
Reimplemented in dmlite::DummyCatalog, and dmlite::BuiltInCatalog.
|
virtual |
Set the ACLs
path | The file to modify. |
acl | The Access Control List. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Set the checksum of a file.
path | The file to modify. |
csumtype | The checksum type cc |
csumvalue | The checksum value. |
Reimplemented in dmlite::DummyCatalog.
|
virtual |
Set the comment associated with a file.
path | The file or directory. |
comment | The new comment. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Set GUID of a file.
path | The file. |
guid | The new GUID. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Set the mode of a file.
path | The file to modify. |
mode | The new mode as an integer (i.e. 0755) |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Set the owner of a file.
path | The file to modify. |
newUid | The uid of the new owneer. |
newGid | The gid of the new group. |
followSymLink | If set to true, symbolic links will be followed. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Set the size of a file.
path | The file to modify. |
newSize | The new file size. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Creates a new symlink.
path | The existing path. |
symlink | The new access path. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Sets the calling process’s file mode creation mask to mask & 0777.
mask | The new mask. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Remove a file.
path | The path to remove. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Update extended metadata on the catalog.
path | The file to update. |
attr | The extended attributes struct. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Update a replica.
replica | The replica to modify. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.
|
virtual |
Set access and/or modification time.
path | The file path. |
buf | A struct holding the new times. |
Reimplemented in dmlite::BuiltInCatalog, and dmlite::DummyCatalog.