#include <libcomprex/fsnode.h>
#include <libcomprex/file.h>
Go to the source code of this file.
Data Structures | |
struct | _CxDirectoryData |
The data specific to a directory node. More... | |
Structure (De)allocation Functions | |
CxDirectory * | cxNewDirectory (void) |
Creates a new CxDirectory structure. | |
void | cxDestroyDirectory (CxDirectory *dir) |
Destroys a CxDirectory structure. | |
Attribute Modification Functions | |
void | cxSetDirArchive (CxDirectory *dir, CxArchive *archive) |
Sets the archive that owns the directory. | |
void | cxSetDirParent (CxDirectory *dir, CxDirectory *parent) |
Sets the specified directory's parent directory. | |
void | cxSetDirName (CxDirectory *dir, const char *name) |
Sets the base directory name of this directory. | |
void | cxSetDirPhysicalPath (CxDirectory *dir, const char *path) |
Sets the full physical path to the directory. | |
void | cxSetDirMode (CxDirectory *dir, mode_t mode) |
Sets the mode of the specified directory. | |
void | cxSetDirGid (CxDirectory *dir, gid_t gid) |
Sets the group ID of the specified directory. | |
void | cxSetDirUid (CxDirectory *dir, uid_t uid) |
Sets the user ID of the specified directory. | |
void | cxSetDirDate (CxDirectory *dir, time_t date) |
Set the timestamp of the specified directory. | |
void | cxSetDirLocal (CxDirectory *dir, char isLocal) |
Sets whether or not the file is stored locally. | |
Attribute Retrieval Functions | |
CxArchive * | cxGetDirArchive (CxDirectory *dir) |
Returns the archive that owns the specified directory. | |
CxDirectory * | cxGetDirParent (CxDirectory *dir) |
Returns the specified directory's parent directory. | |
const char * | cxGetDirName (CxDirectory *dir) |
Returns the base directory name of the specified directory. | |
const char * | cxGetDirPath (CxDirectory *dir) |
Returns the full path name of the specified directory. | |
unsigned int | cxGetFileCount (CxDirectory *dir) |
Returns the number of files in the specified directory. | |
const char * | cxGetDirPhysicalPath (CxDirectory *dir) |
Returns the full physical path to the directory. | |
mode_t | cxGetDirMode (CxDirectory *dir) |
Return the mode of the specified directory. | |
uid_t | cxGetDirUid (CxDirectory *dir) |
Returns the user ID of the specified directory. | |
gid_t | cxGetDirGid (CxDirectory *dir) |
Returns the group ID of the specified directory. | |
time_t | cxGetDirDate (CxDirectory *dir) |
Returns the timestamp of the specified directory. | |
char | cxIsDirLocal (CxDirectory *dir) |
Returns whether or not the directory is stored locally. | |
unsigned int | cxGetSubDirCount (CxDirectory *dir) |
Returns the number of subdirectories in the specified directory. | |
Directory Processing Functions | |
CxDirectory * | cxGetDirectory (CxDirectory *base, const char *path) |
Returns the subdirectory specified in the path. | |
CxFile * | cxGetFile (CxDirectory *base, const char *path) |
Returns the file specified in the path. | |
Directory Modification Functions | |
CxDirectory * | cxMkDir (CxDirectory *base, const char *path) |
Creates a directory. | |
void | cxDirAddFile (CxDirectory *dir, CxFile *file) |
Adds a file to the directory. | |
void | cxDirAddSubDir (CxDirectory *dir, CxDirectory *subdir) |
Adds a subdirectory to a directory. | |
void | cxDirRemoveFile (CxDirectory *dir, CxFile *file) |
Removes a file from the directory. | |
void | cxDirRemoveSubDir (CxDirectory *dir, CxDirectory *subdir) |
Removes a subdirectory from the directory. | |
Iteration Functions | |
CxFile * | cxGetFirstFile (CxDirectory *dir) |
Returns the first file in the directory. | |
CxDirectory * | cxGetFirstSubDir (CxDirectory *dir) |
Returns the first subdirectory in the directory. | |
CxDirectory * | cxGetPreviousDir (CxDirectory *dir) |
Returns the previous directory in a list of directories. | |
CxDirectory * | cxGetNextDir (CxDirectory *dir) |
Returns the next directory in a list of directories. | |
Typedefs | |
typedef _CxFsNode | CxDirectory |
CxDirectory. | |
typedef _CxDirectoryData | CxDirectoryData |
Directory data. |
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.
|
CxDirectory.
|
|
Directory data.
|
|
Destroys a CxDirectory structure.
|
|
Adds a file to the directory. Note that this won't actually create a file in that directory. This just modifies the structure itself! The directory will claim the reference on file, and will delete the structure when dir is deleted. If you wish to keep file intact, you must claim a reference to it using CX_LINK().
|
|
Adds a subdirectory to a directory. Note that this won't actually create a subdirectory in that directory. This just modifies the structure itself! The directory will claim the reference on subdir, and will delete the structure when dir is deleted. If you wish to keep subdir intact, you must claim a reference to it using CX_LINK().
|
|
Removes a file from the directory. Note that this won't actually remove the file from the archive. This just modifies the structure itself!
|
|
Removes a subdirectory from the directory. Note that this won't actually remove the subdirectory from the archive. This just modifies the structure itself!
|
|
Returns the archive that owns the specified directory.
|
|
Returns the timestamp of the specified directory.
|
|
Returns the subdirectory specified in the path.
|
|
Returns the group ID of the specified directory.
|
|
Return the mode of the specified directory.
|
|
Returns the base directory name of the specified directory.
|
|
Returns the specified directory's parent directory.
|
|
Returns the full path name of the specified directory.
|
|
Returns the full physical path to the directory. If the directory is non-local, this will be a temporary directory.
|
|
Returns the user ID of the specified directory.
|
|
Returns the file specified in the path.
|
|
Returns the number of files in the specified directory.
|
|
Returns the first file in the directory.
|
|
Returns the first subdirectory in the directory.
|
|
Returns the next directory in a list of directories.
|
|
Returns the previous directory in a list of directories.
|
|
Returns the number of subdirectories in the specified directory.
|
|
Returns whether or not the directory is stored locally. If the directory is located online, or within an archive, this will be 0. Otherwise, this will be 1.
|
|
Creates a directory. This is equivalent to mkdir -p. That is, it will create each directory in the path if they don't exist.
|
|
Creates a new CxDirectory structure. This does NOT create a new directory. For that, use cxMkDir().
|
|
Sets the archive that owns the directory. This should only be used by libcomprex.
|
|
Set the timestamp of the specified directory.
|
|
Sets the group ID of the specified directory.
|
|
Sets whether or not the file is stored locally. If the directory is located online, or within an archive, this should be 0. Otherwise, this should be 1.
|
|
Sets the mode of the specified directory.
|
|
Sets the base directory name of this directory.
|
|
Sets the specified directory's parent directory.
|
|
Sets the full physical path to the directory.
|
|
Sets the user ID of the specified directory.
|