#include <sys/types.h>
#include <time.h>
#include <libcomprex/archive.h>
#include <libcomprex/directory.h>
#include <libcomprex/file.h>
#include <libcomprex/types.h>
Go to the source code of this file.
Data Structures | |
struct | _CxFsNode |
A representation of a file or directory on the filesystem or in an archive. More... | |
Utility Functions | |
#define | CX_IS_DIRECTORY(node) (cxGetFsNodeType(node) == CX_FSNODETYPE_DIRECTORY) |
Returns true if the specified node type is a directory. | |
Structure (De)allocation Functions | |
CxFsNode * | cxNewFsNode (void) |
Creates a new CxFsNode structure. | |
void | cxDestroyFsNode (CxFsNode *node) |
Destroys a CxFsNode structure. | |
Attribute Modification Functions | |
void | cxSetFsNodeArchive (CxFsNode *node, CxArchive *archive) |
Sets the archive that owns the node. | |
void | cxSetFsNodeParent (CxFsNode *node, CxDirectory *parent) |
Sets the specified node's parent directory. | |
void | cxSetFsNodeName (CxFsNode *node, const char *name) |
Sets the base name of the specified node. | |
void | cxSetFsNodeType (CxFsNode *node, CxFsNodeType type) |
Sets the type of node. | |
void | cxSetFsNodeMode (CxFsNode *node, mode_t mode) |
Sets the mode of the specified node. | |
void | cxSetFsNodeUid (CxFsNode *node, uid_t uid) |
Sets the user ID of the specified node. | |
void | cxSetFsNodeGid (CxFsNode *node, gid_t gid) |
Sets the group ID of the specified node. | |
void | cxSetFsNodeDate (CxFsNode *node, time_t date) |
Sets the timestamp of the specified node. | |
void | cxSetFsNodeLocal (CxFsNode *node, char isLocal) |
Sets whether or not the node is stored locally. | |
Attribute Retrieval Functions | |
CxArchive * | cxGetFsNodeArchive (CxFsNode *node) |
Returns the archive that owns the specified node. | |
CxDirectory * | cxGetFsNodeParent (CxFsNode *node) |
Returns the specified node's parent directory. | |
const char * | cxGetFsNodeName (CxFsNode *node) |
Returns the name of the specified node. | |
const char * | cxGetFsNodePath (CxFsNode *node) |
Returns the full path to the specified node. | |
CxFsNodeType | cxGetFsNodeType (CxFsNode *node) |
Gets the type of node. | |
mode_t | cxGetFsNodeMode (CxFsNode *node) |
Returns the mode of the specified node. | |
uid_t | cxGetFsNodeUid (CxFsNode *node) |
Returns the user ID of the specified node. | |
gid_t | cxGetFsNodeGid (CxFsNode *node) |
Returns the group ID of the specified node. | |
time_t | cxGetFsNodeDate (CxFsNode *node) |
Returns the timestamp of the specified node. | |
char | cxIsFsNodeLocal (CxFsNode *node) |
Returns whether or not the node is stored locally. | |
Iteration Functions | |
CxFsNode * | cxGetNextFsNode (CxFsNode *node) |
Returns the next node in a list of nodes. | |
CxFsNode * | cxGetPreviousFsNode (CxFsNode *node) |
Returns the previous node in a list of nodes. | |
Typedefs | |
typedef _CxFsNode | CxFsNode |
A filesystem node. | |
typedef enum _CxFsNodeType | CxFsNodeType |
A type of node. | |
Enumerations | |
enum | _CxFsNodeType { CX_FSNODETYPE_UNKNOWN = 0, CX_FSNODETYPE_FILE, CX_FSNODETYPE_DIRECTORY } |
A type of filesystem node. More... |
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Returns true if the specified node type is a directory.
|
|
A filesystem node.
|
|
A type of node.
|
|
A type of filesystem node.
|
|
Destroys a CxFsNode structure.
|
|
Returns the archive that owns the specified node.
|
|
Returns the timestamp of the specified node.
|
|
Returns the group ID of the specified node.
|
|
Returns the mode of the specified node.
|
|
Returns the name of the specified node.
|
|
Returns the specified node's parent directory.
|
|
Returns the full path to the specified node. This may include such non-physical elements as FTP sites, archives, etc. in the path.
|
|
Gets the type of node.
|
|
Returns the user ID of the specified node.
|
|
Returns the next node in a list of nodes.
|
|
Returns the previous node in a list of nodes.
|
|
Returns whether or not the node is stored locally. If the node is located online, or within an archive, this will be 0. Otherwise, this will be 1.
|
|
Creates a new CxFsNode structure.
|
|
Sets the archive that owns the node. This should only be used by libcomprex.
|
|
Sets the timestamp of the specified node.
|
|
Sets the group ID of the specified node.
|
|
Sets whether or not the node is stored locally. If the node is located online, or within an archive, this should be 0. Otherwise, this should be 1.
|
|
Sets the mode of the specified node.
|
|
Sets the base name of the specified node.
|
|
Sets the specified node's parent directory.
|
|
Sets the type of node.
|
|
Sets the user ID of the specified node.
|