#include <libcomprex/file.h>
#include <libcomprex/fp.h>
#include <libcomprex/types.h>
Go to the source code of this file.
Functions | |
CxFP * | cxOpenFile (const char *path, CxAccessMode mode) |
Opens a file from a local or remote filesystem, or in an archive. | |
CxFP * | cxOpenFileHandle (CxFile *file, CxAccessMode mode) |
Opens a file from an existing file handle (CxFile structure). | |
CxFP * | cxOpenStream (FILE *stream) |
Opens an existing FILE * stream. | |
CxFP * | cxOpenBuffer (char *buffer, size_t size) |
Opens a stream from a buffer. | |
void | cxClose (CxFP *fp) |
Closes a file pointer. | |
size_t | cxRead (void *ptr, size_t size, size_t nmemb, CxFP *fp) |
Reads data from a file pointer. | |
size_t | cxWrite (const void *ptr, size_t size, size_t nmemb, CxFP *fp) |
Writes data to a file pointer. | |
void | cxSeek (CxFP *fp, long offset, int whence) |
Seeks to a position in the file. | |
void | cxRewind (CxFP *fp) |
Rewinds to the beginning of the stream. | |
long | cxTell (CxFP *fp) |
Returns the current position in the file. | |
void | cxClearErr (CxFP *fp) |
Clears the error flag and end-of-file indicator. | |
int | cxEof (CxFP *fp) |
Tests the end-of-file indicator. | |
int | cxError (CxFP *fp) |
Tests the error indicator of the file. | |
const char * | cxStrError (CxFP *fp, int errnum) |
Returns a string representation of the error. |
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.
|
Clears the error flag and end-of-file indicator.
|
|
Closes a file pointer. The CxFP structure will be freed after this is called.
|
|
Tests the end-of-file indicator.
|
|
Tests the error indicator of the file.
|
|
Opens a stream from a buffer.
|
|
Opens a file from a local or remote filesystem, or in an archive.
|
|
Opens a file from an existing file handle (CxFile structure).
|
|
Opens an existing
|
|
Reads data from a file pointer.
|
|
Rewinds to the beginning of the stream.
|
|
Seeks to a position in the file.
|
|
Returns a string representation of the error.
|
|
Returns the current position in the file.
|
|
Writes data to a file pointer.
|