Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

fsiter.h File Reference

Filesystem iteration API. More...

#include <libcomprex/directory.h>
#include <libcomprex/fsnode.h>

Go to the source code of this file.

Data Structures

struct  _CxFsIterator
 An iterator interface for iterating through files or directories in an archive. More...


Structure (De)allocation Functions

CxFsIteratorcxNewFsIterator (CxArchive *archive, CxFsIteratorType type)
 Creates a filesystem iterator.

void cxDestroyFsIterator (CxFsIterator *iterator)
 Destroys a filesystem iterator.


Iteration Functions

CxFsNodecxGetFsIterFirst (CxFsIterator *iterator)
 Returns the first item.

CxFsNodecxGetFsIterNext (CxFsIterator *iterator)
 Returns the next item.

CxFsNodecxGetFsIterPrev (CxFsIterator *iterator)
 Returns the previous item.


Typedefs

typedef _CxFsIterator CxFsIterator
 Filesystem iterator.


Enumerations

enum  CxFsIteratorType { CX_FSITER_FILES = 0, CX_FSITER_DIRS, CX_FSITER_FILES_DIRS }


Detailed Description

Filesystem iteration API.

Copyright:
(C) 2001-2003 The GNUpdate Project.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

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.


Typedef Documentation

typedef struct _CxFsIterator CxFsIterator
 

Filesystem iterator.


Enumeration Type Documentation

enum CxFsIteratorType
 

Enumeration values:
CX_FSITER_FILES  File iterator.
CX_FSITER_DIRS  Directory iterator.
CX_FSITER_FILES_DIRS  File and directory iterator.


Function Documentation

void cxDestroyFsIterator CxFsIterator   iterator
 

Destroys a filesystem iterator.

This should be called when done with an iterator.

Parameters:
iterator The iterator to destroy.

CxFsNode* cxGetFsIterFirst CxFsIterator   iterator
 

Returns the first item.

Parameters:
iterator The iterator.
Returns:
The first item.
See also:
cxGetIterNext()

cxGetIterPrev()

CxFsNode* cxGetFsIterNext CxFsIterator   iterator
 

Returns the next item.

If this hasn't been called previously, it will return the first item.

Parameters:
iterator The iterator.
Returns:
The next item.
See also:
cxGetIterFirst()

cxGetIterPrev()

CxFsNode* cxGetFsIterPrev CxFsIterator   iterator
 

Returns the previous item.

If cxGetIterNext() hasn't been called yet, this will return NULL.

Parameters:
iterator The iterator.
Returns:
The previous item.
See also:
cxGetIterFirst()

cxGetIterNext()

CxFsIterator* cxNewFsIterator CxArchive   archive,
CxFsIteratorType    type
 

Creates a filesystem iterator.

This will normally only be used within libpackman.

Parameters:
archive The associated archive.
type The filesystem iterator type.
Returns:
A new CxFsIterator.


Generated on Wed Mar 5 20:47:44 2003 for libcomprex by doxygen1.2.18-20021020