#include "cpl_port.h"
#include <unistd.h>
#include <sys/stat.h>
Defines | |||
![]() | ![]() | #define | VSI_ISLNK(x) S_ISLNK(x) |
![]() | ![]() | #define | VSI_ISREG(x) S_ISREG(x) |
![]() | ![]() | #define | VSI_ISDIR(x) S_ISDIR(x) |
![]() | ![]() | #define | VSI_ISCHR(x) S_ISCHR(x) |
![]() | ![]() | #define | VSI_ISBLK(x) S_ISBLK(x) |
Typedefs | |||
![]() | ![]() | typedef struct stat | VSIStatBuf |
Functions | |||
![]() | ![]() | CPL_C_START FILE CPL_DLL* | VSIFOpen ( const char *, const char * ) |
![]() | ![]() | int CPL_DLL | VSIFClose ( FILE * ) |
![]() | ![]() | int CPL_DLL | VSIFSeek ( FILE *, long, int ) |
![]() | ![]() | long CPL_DLL | VSIFTell ( FILE * ) |
![]() | ![]() | void CPL_DLL | VSIRewind ( FILE * ) |
![]() | ![]() | size_t CPL_DLL | VSIFRead ( void *, size_t, size_t, FILE * ) |
![]() | ![]() | size_t CPL_DLL | VSIFWrite ( void *, size_t, size_t, FILE * ) |
![]() | ![]() | char CPL_DLL* | VSIFGets ( char *, int, FILE * ) |
![]() | ![]() | int CPL_DLL | VSIFPuts ( const char *, FILE * ) |
![]() | ![]() | int CPL_DLL | VSIFPrintf ( FILE *, const char *, ... ) |
![]() | ![]() | int CPL_DLL | VSIFGetc ( FILE * ) |
![]() | ![]() | int CPL_DLL | VSIFPutc ( int, FILE * ) |
![]() | ![]() | int CPL_DLL | VSIUngetc ( int, FILE * ) |
![]() | ![]() | int CPL_DLL | VSIFEof ( FILE * ) |
![]() | ![]() | int CPL_DLL | VSIStat ( const char *, VSIStatBuf * ) |
![]() | ![]() | void CPL_DLL* | VSICalloc ( size_t, size_t ) |
![]() | ![]() | void CPL_DLL* | VSIMalloc ( size_t ) |
![]() | ![]() | void CPL_DLL | VSIFree ( void * ) |
![]() | ![]() | void CPL_DLL* | VSIRealloc ( void *, size_t ) |
![]() | ![]() | char CPL_DLL* | VSIStrdup ( const char * ) |
![]() | ![]() | int CPL_DLL | VSIMkdir ( const char * pathname, long mode ) |
![]() | ![]() | int CPL_DLL | VSIUnlink ( const char * pathname ) |
The VSI functions are intended to be hookable aliases for Standard C I/O, memory allocation and other system functions. They are intended to allow virtualization of disk I/O so that non file data sources can be made to appear as files, and so that additional error trapping and reporting can be interested. The memory access API is aliased so that special application memory management services can be used.
Is is intended that each of these functions retains exactly the same calling pattern as the original Standard C functions they relate to. This means we don't have to provide custom documentation, and also means that the default implementation is very simple.