#include <libcomprex/file.h>
Go to the source code of this file.
Data Structures | |
struct | _CxDirectory |
A representation of a directory on the filesystem or in an archive. 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 | cxSetDirectoryName (CxDirectory *dir, const char *name) |
Sets the path name of this directory. | |
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 * | cxGetDirectoryName (CxDirectory *dir) |
Returns the path name of the specified directory. | |
unsigned int | cxGetFileCount (CxDirectory *dir) |
Returns the number of files in the specified directory. | |
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 | |
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 _CxDirectory | CxDirectory |
CxDirectory. |
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.
|
|
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 subdirectory specified in the path.
|
|
Returns the path name of the specified directory.
|
|
Returns the specified directory's parent 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.
|
|
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.
|
|
Sets the path name of this directory.
|
|
Sets the specified directory's parent directory.
|