#include <inode.h>
Inherits dmlite::BaseInterface.

Public Member Functions | |
| virtual | ~INode () |
| Destructor. | |
| virtual void | begin (void)=0 throw (DmException) |
| Start a transaction. | |
| virtual void | commit (void)=0 throw (DmException) |
| Commit a transaction. | |
| virtual void | rollback (void)=0 throw (DmException) |
| Rollback changes. | |
| virtual ExtendedStat | create (const ExtendedStat &f)=0 throw (DmException) |
| virtual void | symlink (ino_t inode, const std::string &link)=0 throw (DmException) |
| virtual void | unlink (ino_t inode)=0 throw (DmException) |
| virtual void | move (ino_t inode, ino_t dest)=0 throw (DmException) |
| virtual void | rename (ino_t inode, const std::string &name)=0 throw (DmException) |
| virtual ExtendedStat | extendedStat (ino_t inode)=0 throw (DmException) |
| virtual ExtendedStat | extendedStat (ino_t parent, const std::string &name)=0 throw (DmException) |
| virtual ExtendedStat | extendedStat (const std::string &guid)=0 throw (DmException) |
| virtual SymLink | readLink (ino_t inode)=0 throw (DmException) |
| virtual void | addReplica (const Replica &replica)=0 throw (DmException) |
| virtual void | deleteReplica (const Replica &replica)=0 throw (DmException) |
| virtual Replica | getReplica (int64_t rid)=0 throw (DmException) |
| virtual Replica | getReplica (const std::string &rfn)=0 throw (DmException) |
| virtual void | updateReplica (const Replica &replica)=0 throw (DmException) |
| virtual std::vector< Replica > | getReplicas (ino_t inode)=0 throw (DmException) |
| virtual void | utime (ino_t inode, const struct utimbuf *buf)=0 throw (DmException) |
| virtual void | setMode (ino_t inode, uid_t uid, gid_t gid, mode_t mode, const Acl &acl)=0 throw (DmException) |
| virtual void | setSize (ino_t inode, size_t size)=0 throw (DmException) |
| virtual void | setChecksum (ino_t inode, const std::string &csumtype, const std::string &csumvalue)=0 throw (DmException) |
| virtual std::string | getComment (ino_t inode)=0 throw (DmException) |
| virtual void | setComment (ino_t inode, const std::string &comment)=0 throw (DmException) |
| virtual void | deleteComment (ino_t inode)=0 throw (DmException) |
| virtual void | setGuid (ino_t inode, const std::string &guid)=0 throw (DmException) |
| virtual void | updateExtendedAttributes (ino_t inode, const Extensible &attr)=0 throw (DmException) |
| virtual IDirectory * | openDir (ino_t inode)=0 throw (DmException) |
| virtual void | closeDir (IDirectory *dir)=0 throw (DmException) |
| virtual ExtendedStat * | readDirx (IDirectory *dir)=0 throw (DmException) |
| virtual struct dirent * | readDir (IDirectory *dir)=0 throw (DmException) |
Low-level interface. Based on i-nodes.
| INode::~INode | ( | ) | [virtual] |
Destructor.
| virtual void dmlite::INode::addReplica | ( | const Replica & | replica | ) | throw (DmException) [pure 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. |
| virtual void dmlite::INode::begin | ( | void | ) | throw (DmException) [pure virtual] |
Start a transaction.
| virtual void dmlite::INode::closeDir | ( | IDirectory * | dir | ) | throw (DmException) [pure virtual] |
Close a directory.
| dir | The opaque structure to close. |
| virtual void dmlite::INode::commit | ( | void | ) | throw (DmException) [pure virtual] |
Commit a transaction.
| virtual ExtendedStat dmlite::INode::create | ( | const ExtendedStat & | f | ) | throw (DmException) [pure virtual] |
Create a new file or directory
| f | The file that will be inserted. Its fields must be initialized. |
| virtual void dmlite::INode::deleteComment | ( | ino_t | inode | ) | throw (DmException) [pure virtual] |
Remove the associated comment.
| inode | The file whose comment will be removed. |
| virtual void dmlite::INode::deleteReplica | ( | const Replica & | replica | ) | throw (DmException) [pure virtual] |
Delete a replica.
| replica | The replica to remove. |
| virtual ExtendedStat dmlite::INode::extendedStat | ( | const std::string & | guid | ) | throw (DmException) [pure virtual] |
Do an extended stat using the GUID.
| guid | The file GUID. |
| virtual ExtendedStat dmlite::INode::extendedStat | ( | ino_t | parent, | |
| const std::string & | name | |||
| ) | throw (DmException) [pure virtual] |
Do an extended stat of an entry using the parent inode and the name.
| parent | The parent inode. | |
| name | The file or directory name. |
| virtual ExtendedStat dmlite::INode::extendedStat | ( | ino_t | inode | ) | throw (DmException) [pure virtual] |
Do an extended stat of en entry using its inode.
| inode | The inode of the file. |
| virtual std::string dmlite::INode::getComment | ( | ino_t | inode | ) | throw (DmException) [pure virtual] |
Get the comment associated to a file.
| inode | The inode of the file. |
| virtual Replica dmlite::INode::getReplica | ( | const std::string & | rfn | ) | throw (DmException) [pure virtual] |
Get a replica.
| rfn | The replica to retrieve. |
| virtual Replica dmlite::INode::getReplica | ( | int64_t | rid | ) | throw (DmException) [pure virtual] |
Get a replica using the replica ID.
| rid | The replica ID. |
| virtual std::vector<Replica> dmlite::INode::getReplicas | ( | ino_t | inode | ) | throw (DmException) [pure virtual] |
Get replicas for a file.
| inode | The entry inode. |
| virtual void dmlite::INode::move | ( | ino_t | inode, | |
| ino_t | dest | |||
| ) | throw (DmException) [pure virtual] |
Move a file between two directories.
| inode | File to be moved. | |
| dest | The new parent. |
| virtual IDirectory* dmlite::INode::openDir | ( | ino_t | inode | ) | throw (DmException) [pure virtual] |
Open a directory.
| inode | The inode of the directory. |
| virtual struct dirent* dmlite::INode::readDir | ( | IDirectory * | dir | ) | throw (DmException) [read, pure virtual] |
Read the next entry.
| dir | The opaque structure of a directory. |
| virtual ExtendedStat* dmlite::INode::readDirx | ( | IDirectory * | dir | ) | throw (DmException) [pure virtual] |
Read the next entry.
| dir | The opaque structure of a directory. |
| virtual SymLink dmlite::INode::readLink | ( | ino_t | inode | ) | throw (DmException) [pure virtual] |
Get the symlink associated with a inode.
| inode | The inode of the file. |
| virtual void dmlite::INode::rename | ( | ino_t | inode, | |
| const std::string & | name | |||
| ) | throw (DmException) [pure virtual] |
Change the name of a file.
| inode | The inode of the file. | |
| name | New name. |
| virtual void dmlite::INode::rollback | ( | void | ) | throw (DmException) [pure virtual] |
Rollback changes.
| virtual void dmlite::INode::setChecksum | ( | ino_t | inode, | |
| const std::string & | csumtype, | |||
| const std::string & | csumvalue | |||
| ) | throw (DmException) [pure virtual] |
Set the checksum of a file.
| inode | The inode of the file. | |
| csumtype | The checksum type. | |
| csumvalue | The checksum value. |
| virtual void dmlite::INode::setComment | ( | ino_t | inode, | |
| const std::string & | comment | |||
| ) | throw (DmException) [pure virtual] |
Set the comment associated to a file.
| inode | The inode of the file. | |
| comment | The new comment. |
| virtual void dmlite::INode::setGuid | ( | ino_t | inode, | |
| const std::string & | guid | |||
| ) | throw (DmException) [pure virtual] |
Set the GUID of a file.
| inode | The inode of the file. | |
| guid | The new GUID. |
| virtual void dmlite::INode::setMode | ( | ino_t | inode, | |
| uid_t | uid, | |||
| gid_t | gid, | |||
| mode_t | mode, | |||
| const Acl & | acl | |||
| ) | throw (DmException) [pure virtual] |
Set the mode of a file.
| inode | The inode of the file. | |
| uid | The owner. If -1, not changed. | |
| gid | The group. If -1, not changed. | |
| mode | The new mode. S_IFMT bits are cleared, and kept as they are in the DB. | |
| acl | The new ACL. If empty, not changed. |
| virtual void dmlite::INode::setSize | ( | ino_t | inode, | |
| size_t | size | |||
| ) | throw (DmException) [pure virtual] |
Set the size of a file.
| inode | The inode of the file. | |
| size | The new size. |
| virtual void dmlite::INode::symlink | ( | ino_t | inode, | |
| const std::string & | link | |||
| ) | throw (DmException) [pure virtual] |
Create or modify the file inode to point to another file.
| inode | The file to modify. | |
| link | The new symbolic link. |
| virtual void dmlite::INode::unlink | ( | ino_t | inode | ) | throw (DmException) [pure virtual] |
Remove a file or directory. It will fail if it is a directory and it is not empty, or if it a file and it has replicas.
| inode | The inode of the file. |
| virtual void dmlite::INode::updateExtendedAttributes | ( | ino_t | inode, | |
| const Extensible & | attr | |||
| ) | throw (DmException) [pure virtual] |
Update extended metadata on the catalog.
| attr | The extended attributes struct. |
| virtual void dmlite::INode::updateReplica | ( | const Replica & | replica | ) | throw (DmException) [pure virtual] |
Modify a replica.
| replica | The replica data. |
| virtual void dmlite::INode::utime | ( | ino_t | inode, | |
| const struct utimbuf * | buf | |||
| ) | throw (DmException) [pure virtual] |
Change access and/or modification time.
| inode | The inode of the file. | |
| buf | A struct holding the new times. |
1.6.1