G:/ScriptBasic/source/filesys.c File Reference

#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <sys/socket.h>
#include <utime.h>
#include <signal.h>
#include "filesys.h"
#include "errcodes.h"

Go to the source code of this file.

Defines

#define SHUT_RDWR   2
#define SD_BOTH   2
#define LK_LEN   0xffff0000
#define MAX_FNLEN   1024

Functions

FILE * file_fopen (char *pszFileName, char *pszOpenMode)
void file_fclose (FILE *fp)
long file_size (char *pszFileName)
long file_time_accessed (char *pszFileName)
long file_time_modified (char *pszFileName)
long file_time_created (char *pszFileName)
int file_isdir (char *pszFileName)
int file_isreg (char *pszFileName)
int file_exists (char *pszFileName)
int file_truncate (FILE *fp, long lNewFileSize)
int file_fgetc (FILE *fp)
int file_ferror (FILE *fp)
int file_fread (char *buf, int size, int count, FILE *fp)
int file_fwrite (char *buf, int size, int count, FILE *fp)
int file_fputc (int c, FILE *fp)
void file_setmode (FILE *fp, int mode)
void file_binmode (FILE *fp)
void file_textmode (FILE *fp)
int file_flock (FILE *fp, int iLockType)
int file_lock (FILE *fp, int iLockType, long lStart, long lLength)
int file_feof (FILE *fp)
int file_mkdir (char *pszDirectoryName)
int file_rmdir (char *pszDirectoryName)
int file_remove (char *pszFileName)
int file_deltree_r (char *buffer)
int file_deltree (char *pszDirectoryName)
int file_MakeDirectory (char *pszDirectoryName)
DIR * file_opendir (char *pszDirectoryName, tDIR *pDirectory)


Define Documentation

#define LK_LEN   0xffff0000
 

Referenced by file_flock().

#define MAX_FNLEN   1024
 

Definition at line 886 of file filesys.c.

#define SD_BOTH   2
 

Definition at line 108 of file filesys.c.

#define SHUT_RDWR   2
 

Definition at line 105 of file filesys.c.


Function Documentation

void file_binmode FILE *  fp  ) 
 

Definition at line 605 of file filesys.c.

References file_setmode().

Referenced by hook_binmode().

int file_deltree char *  pszDirectoryName  ) 
 

Definition at line 933 of file filesys.c.

References buffer, file_deltree_r(), file_exists(), file_isdir(), MAX_FNLEN, s, and strcpy().

Referenced by hook_deltree(), modu_Init(), and MyFiles().

int file_deltree_r char *  buffer  ) 
 

Definition at line 887 of file filesys.c.

References DirList, file_isdir(), file_opendir(), file_remove(), file_rmdir(), MAX_FNLEN, NULL, pDirList, and strcpy().

Referenced by file_deltree().

int file_exists char *  pszFileName  ) 
 

Definition at line 457 of file filesys.c.

References i.

Referenced by file_deltree(), file_MakeDirectory(), hook_exists(), modu_Init(), and MyFiles().

void file_fclose FILE *  fp  ) 
 

Definition at line 171 of file filesys.c.

Referenced by _MyCloseFile(), build_GetExeCodeOffset(), build_IsFileBinaryFormat(), build_LoadCodeWithOffset(), build_SaveCode(), build_SaveECode(), FtpProc(), hook_fclose(), and modu_Init().

int file_feof FILE *  fp  ) 
 

Definition at line 800 of file filesys.c.

Referenced by hook_feof(), and modu_Init().

int file_ferror FILE *  fp  ) 
 

Definition at line 524 of file filesys.c.

Referenced by hook_ferror(), and modu_Init().

int file_fgetc FILE *  fp  ) 
 

Definition at line 510 of file filesys.c.

Referenced by _MyGetCharacter(), hook_fgetc(), and modu_Init().

int file_flock FILE *  fp,
int  iLockType
 

Definition at line 634 of file filesys.c.

References i, LK_LEN, memset(), and SEEK_SET.

Referenced by hook_flock(), and modu_Init().

FILE* file_fopen char *  pszFileName,
char *  pszOpenMode
 

Definition at line 145 of file filesys.c.

Referenced by _MyOpenFile(), build_GetExeCodeOffset(), build_IsFileBinaryFormat(), build_LoadCodeWithOffset(), build_SaveCCode(), build_SaveCode(), build_SaveECode(), FtpProc(), hook_fopen(), and modu_Init().

int file_fputc int  c,
FILE *  fp
 

Definition at line 572 of file filesys.c.

Referenced by hook_fputc(), and modu_Init().

int file_fread char *  buf,
int  size,
int  count,
FILE *  fp
 

Definition at line 538 of file filesys.c.

Referenced by build_GetExeCodeOffset(), hook_fread(), and modu_Init().

int file_fwrite char *  buf,
int  size,
int  count,
FILE *  fp
 

Definition at line 555 of file filesys.c.

Referenced by build_SaveECode(), hook_fwrite(), and modu_Init().

int file_isdir char *  pszFileName  ) 
 

Definition at line 403 of file filesys.c.

References i.

Referenced by file_deltree(), file_deltree_r(), file_MakeDirectory(), hook_isdir(), and modu_Init().

int file_isreg char *  pszFileName  ) 
 

Definition at line 430 of file filesys.c.

References i.

Referenced by hook_isreg(), and modu_Init().

int file_lock FILE *  fp,
int  iLockType,
long  lStart,
long  lLength
 

Definition at line 719 of file filesys.c.

References i, memset(), and SEEK_SET.

Referenced by hook_lock(), and modu_Init().

int file_MakeDirectory char *  pszDirectoryName  ) 
 

Definition at line 980 of file filesys.c.

References file_exists(), file_isdir(), file_mkdir(), i, iResult, and s.

Referenced by hook_MakeDirectory(), modu_Init(), and MyFiles().

int file_mkdir char *  pszDirectoryName  ) 
 

Definition at line 818 of file filesys.c.

References s.

Referenced by file_MakeDirectory(), hook_mkdir(), and modu_Init().

DIR* file_opendir char *  pszDirectoryName,
tDIR *  pDirectory
 

Definition at line 1059 of file filesys.c.

References NULL, and strcpy().

Referenced by file_deltree_r(), hook_opendir(), and modu_Init().

int file_remove char *  pszFileName  ) 
 

Definition at line 869 of file filesys.c.

References s.

Referenced by file_deltree_r(), hook_remove(), and modu_Init().

int file_rmdir char *  pszDirectoryName  ) 
 

Definition at line 843 of file filesys.c.

References s.

Referenced by file_deltree_r(), hook_rmdir(), and modu_Init().

void file_setmode FILE *  fp,
int  mode
 

Definition at line 587 of file filesys.c.

Referenced by file_binmode(), file_textmode(), and hook_setmode().

long file_size char *  pszFileName  ) 
 

Definition at line 183 of file filesys.c.

References i.

Referenced by GetExtensionVersion(), hook_size(), and modu_Init().

void file_textmode FILE *  fp  ) 
 

Definition at line 619 of file filesys.c.

References file_setmode().

Referenced by hook_textmode().

long file_time_accessed char *  pszFileName  ) 
 

Definition at line 245 of file filesys.c.

References CloseHandle(), i, lTime, and NULL.

Referenced by hook_time_accessed(), and modu_Init().

long file_time_created char *  pszFileName  ) 
 

Definition at line 351 of file filesys.c.

References CloseHandle(), i, lTime, and NULL.

Referenced by hook_time_created(), and modu_Init().

long file_time_modified char *  pszFileName  ) 
 

Definition at line 297 of file filesys.c.

References CloseHandle(), i, lTime, and NULL.

Referenced by hook_time_modified(), HttpExtensionProc(), main(), modu_Init(), and scriba_UseCacheFile().

int file_truncate FILE *  fp,
long  lNewFileSize
 

Definition at line 488 of file filesys.c.

Referenced by hook_truncate(), and modu_Init().


Generated on Sun Mar 12 23:56:37 2006 for ScriptBasic by  doxygen 1.4.6-NO