tclIOUtil.c File Reference

#include "tclInt.h"
#include "tclFileSystem.h"

Go to the source code of this file.

Data Structures

struct  FsDivertLoad

Defines

#define OUT_OF_RANGE(x)
#define OUT_OF_URANGE(x)   (((Tcl_WideUInt)(x)) > ((Tcl_WideUInt)ULONG_MAX))
#define RW_MODES   (O_RDONLY|O_WRONLY|O_RDWR)

Functions

int Tcl_Stat (const char *path, struct stat *oldStyleBuf)
int Tcl_Access (const char *path, int mode)
Tcl_Channel Tcl_OpenFileChannel (Tcl_Interp *interp, const char *path, const char *modeString, int permissions)
int Tcl_Chdir (const char *dirName)
char * Tcl_GetCwd (Tcl_Interp *interp, Tcl_DString *cwdPtr)
int Tcl_EvalFile (Tcl_Interp *interp, const char *fileName)
int TclFSCwdIsNative (void)
int TclFSCwdPointerEquals (Tcl_Obj **pathPtrPtr)
int TclFSEpochOk (int filesystemEpoch)
void TclFinalizeFilesystem (void)
void TclResetFilesystem (void)
int Tcl_FSRegister (ClientData clientData, Tcl_Filesystem *fsPtr)
int Tcl_FSUnregister (Tcl_Filesystem *fsPtr)
int Tcl_FSMatchInDirectory (Tcl_Interp *interp, Tcl_Obj *resultPtr, Tcl_Obj *pathPtr, const char *pattern, Tcl_GlobTypeData *types)
void Tcl_FSMountsChanged (Tcl_Filesystem *fsPtr)
ClientData Tcl_FSData (Tcl_Filesystem *fsPtr)
int TclFSNormalizeToUniquePath (Tcl_Interp *interp, Tcl_Obj *pathPtr, int startAt, ClientData *clientDataPtr)
int TclGetOpenMode (Tcl_Interp *interp, const char *modeString, int *seekFlagPtr)
int TclGetOpenModeEx (Tcl_Interp *interp, const char *modeString, int *seekFlagPtr, int *binaryPtr)
int Tcl_FSEvalFile (Tcl_Interp *interp, Tcl_Obj *pathPtr)
int Tcl_FSEvalFileEx (Tcl_Interp *interp, Tcl_Obj *pathPtr, const char *encodingName)
int Tcl_GetErrno (void)
void Tcl_SetErrno (int err)
const char * Tcl_PosixError (Tcl_Interp *interp)
int Tcl_FSStat (Tcl_Obj *pathPtr, Tcl_StatBuf *buf)
int Tcl_FSLstat (Tcl_Obj *pathPtr, Tcl_StatBuf *buf)
int Tcl_FSAccess (Tcl_Obj *pathPtr, int mode)
Tcl_Channel Tcl_FSOpenFileChannel (Tcl_Interp *interp, Tcl_Obj *pathPtr, const char *modeString, int permissions)
int Tcl_FSUtime (Tcl_Obj *pathPtr, struct utimbuf *tval)
const char ** Tcl_FSFileAttrStrings (Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef)
int TclFSFileAttrIndex (Tcl_Obj *pathPtr, const char *attributeName, int *indexPtr)
int Tcl_FSFileAttrsGet (Tcl_Interp *interp, int index, Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef)
int Tcl_FSFileAttrsSet (Tcl_Interp *interp, int index, Tcl_Obj *pathPtr, Tcl_Obj *objPtr)
Tcl_ObjTcl_FSGetCwd (Tcl_Interp *interp)
int Tcl_FSChdir (Tcl_Obj *pathPtr)
int Tcl_FSLoadFile (Tcl_Interp *interp, Tcl_Obj *pathPtr, const char *sym1, const char *sym2, Tcl_PackageInitProc **proc1Ptr, Tcl_PackageInitProc **proc2Ptr, Tcl_LoadHandle *handlePtr, Tcl_FSUnloadFileProc **unloadProcPtr)
int TclLoadFile (Tcl_Interp *interp, Tcl_Obj *pathPtr, int symc, const char *symbols[], Tcl_PackageInitProc **procPtrs[], Tcl_LoadHandle *handlePtr, ClientData *clientDataPtr, Tcl_FSUnloadFileProc **unloadProcPtr)
int TclpLoadFile (Tcl_Interp *interp, Tcl_Obj *pathPtr, const char *sym1, CONST char *sym2, Tcl_PackageInitProc **proc1Ptr, Tcl_PackageInitProc **proc2Ptr, ClientData *clientDataPtr, Tcl_FSUnloadFileProc **unloadProcPtr)
Tcl_ObjTcl_FSLink (Tcl_Obj *pathPtr, Tcl_Obj *toPtr, int linkAction)
Tcl_ObjTcl_FSListVolumes (void)
Tcl_ObjTcl_FSSplitPath (Tcl_Obj *pathPtr, int *lenPtr)
Tcl_ObjTclFSInternalToNormalized (Tcl_Filesystem *fromFilesystem, ClientData clientData, FilesystemRecord **fsRecPtrPtr)
Tcl_PathType TclGetPathType (Tcl_Obj *pathPtr, Tcl_Filesystem **filesystemPtrPtr, int *driveNameLengthPtr, Tcl_Obj **driveNameRef)
Tcl_PathType TclFSNonnativePathType (const char *path, int pathLen, Tcl_Filesystem **filesystemPtrPtr, int *driveNameLengthPtr, Tcl_Obj **driveNameRef)
int Tcl_FSRenameFile (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr)
int Tcl_FSCopyFile (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr)
int TclCrossFilesystemCopy (Tcl_Interp *interp, Tcl_Obj *source, Tcl_Obj *target)
int Tcl_FSDeleteFile (Tcl_Obj *pathPtr)
int Tcl_FSCreateDirectory (Tcl_Obj *pathPtr)
int Tcl_FSCopyDirectory (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr, Tcl_Obj **errorPtr)
int Tcl_FSRemoveDirectory (Tcl_Obj *pathPtr, int recursive, Tcl_Obj **errorPtr)
Tcl_FilesystemTcl_FSGetFileSystemForPath (Tcl_Obj *pathPtr)
const char * Tcl_FSGetNativePath (Tcl_Obj *pathPtr)
Tcl_ObjTcl_FSFileSystemInfo (Tcl_Obj *pathPtr)
Tcl_ObjTcl_FSPathSeparator (Tcl_Obj *pathPtr)

Variables

MODULE_SCOPE const char * tclpFileAttrStrings []
MODULE_SCOPE const TclFileAttrProcs tclpFileAttrProcs []
Tcl_FSFilesystemPathTypeProc TclpFilesystemPathType
Tcl_FSInternalToNormalizedProc TclpNativeToNormalized
Tcl_FSStatProc TclpObjStat
Tcl_FSAccessProc TclpObjAccess
Tcl_FSMatchInDirectoryProc TclpMatchInDirectory
Tcl_FSChdirProc TclpObjChdir
Tcl_FSLstatProc TclpObjLstat
Tcl_FSCopyFileProc TclpObjCopyFile
Tcl_FSDeleteFileProc TclpObjDeleteFile
Tcl_FSRenameFileProc TclpObjRenameFile
Tcl_FSCreateDirectoryProc TclpObjCreateDirectory
Tcl_FSCopyDirectoryProc TclpObjCopyDirectory
Tcl_FSRemoveDirectoryProc TclpObjRemoveDirectory
Tcl_FSUnloadFileProc TclpUnloadFile
Tcl_FSLinkProc TclpObjLink
Tcl_FSListVolumesProc TclpObjListVolumes
Tcl_Filesystem tclNativeFilesystem
Tcl_ThreadDataKey tclFsDataKey


Define Documentation

#define OUT_OF_RANGE (  ) 

Value:

(((Tcl_WideInt)(x)) < Tcl_LongAsWide(LONG_MIN) || \
         ((Tcl_WideInt)(x)) > Tcl_LongAsWide(LONG_MAX))

Referenced by Tcl_Stat().

#define OUT_OF_URANGE (  )     (((Tcl_WideUInt)(x)) > ((Tcl_WideUInt)ULONG_MAX))

Referenced by Tcl_Stat().

#define RW_MODES   (O_RDONLY|O_WRONLY|O_RDWR)

Referenced by TclGetOpenModeEx().


Function Documentation

int Tcl_Access ( const char *  path,
int  mode 
)

Definition at line 154 of file tclIOUtil.c.

References Tcl_DecrRefCount, Tcl_FSAccess(), Tcl_IncrRefCount, and Tcl_NewStringObj().

int Tcl_Chdir ( const char *  dirName  ) 

Definition at line 191 of file tclIOUtil.c.

References Tcl_DecrRefCount, Tcl_FSChdir(), Tcl_IncrRefCount, and Tcl_NewStringObj().

int Tcl_EvalFile ( Tcl_Interp interp,
const char *  fileName 
)

Definition at line 222 of file tclIOUtil.c.

References Tcl_DecrRefCount, Tcl_FSEvalFile(), Tcl_IncrRefCount, and Tcl_NewStringObj().

int Tcl_FSCopyDirectory ( Tcl_Obj srcPathPtr,
Tcl_Obj destPathPtr,
Tcl_Obj **  errorPtr 
)

int Tcl_FSCopyFile ( Tcl_Obj srcPathPtr,
Tcl_Obj destPathPtr 
)

int Tcl_FSCreateDirectory ( Tcl_Obj pathPtr  ) 

ClientData Tcl_FSData ( Tcl_Filesystem fsPtr  ) 

int Tcl_FSDeleteFile ( Tcl_Obj pathPtr  ) 

int Tcl_FSEvalFile ( Tcl_Interp interp,
Tcl_Obj pathPtr 
)

Definition at line 1722 of file tclIOUtil.c.

References Tcl_FSEvalFileEx().

Referenced by Tcl_EvalFile().

int Tcl_FSFileAttrsGet ( Tcl_Interp interp,
int  index,
Tcl_Obj pathPtr,
Tcl_Obj **  objPtrRef 
)

int Tcl_FSFileAttrsSet ( Tcl_Interp interp,
int  index,
Tcl_Obj pathPtr,
Tcl_Obj objPtr 
)

const char** Tcl_FSFileAttrStrings ( Tcl_Obj pathPtr,
Tcl_Obj **  objPtrRef 
)

Tcl_Obj* Tcl_FSLink ( Tcl_Obj pathPtr,
Tcl_Obj toPtr,
int  linkAction 
)

int Tcl_FSLoadFile ( Tcl_Interp interp,
Tcl_Obj pathPtr,
const char *  sym1,
const char *  sym2,
Tcl_PackageInitProc **  proc1Ptr,
Tcl_PackageInitProc **  proc2Ptr,
Tcl_LoadHandle handlePtr,
Tcl_FSUnloadFileProc **  unloadProcPtr 
)

Definition at line 3029 of file tclIOUtil.c.

References TclLoadFile().

int Tcl_FSLstat ( Tcl_Obj pathPtr,
Tcl_StatBuf buf 
)

void Tcl_FSMountsChanged ( Tcl_Filesystem fsPtr  ) 

Definition at line 1324 of file tclIOUtil.c.

References Tcl_MutexLock, and Tcl_MutexUnlock.

Referenced by TclSetEnv().

Tcl_Obj* Tcl_FSPathSeparator ( Tcl_Obj pathPtr  ) 

int Tcl_FSRenameFile ( Tcl_Obj srcPathPtr,
Tcl_Obj destPathPtr 
)

int Tcl_FSUtime ( Tcl_Obj pathPtr,
struct utimbuf *  tval 
)

Definition at line 2297 of file tclIOUtil.c.

References Tcl_FSGetFileSystemForPath(), and Tcl_Filesystem::utimeProc.

Referenced by Tcl_FileObjCmd(), and TclCrossFilesystemCopy().

char* Tcl_GetCwd ( Tcl_Interp interp,
Tcl_DString cwdPtr 
)

int Tcl_GetErrno ( void   ) 

Definition at line 1880 of file tclIOUtil.c.

Referenced by Tcl_FSEqualPaths(), TclFileAttrsCmd(), and TclLoadFile().

Tcl_Channel Tcl_OpenFileChannel ( Tcl_Interp interp,
const char *  path,
const char *  modeString,
int  permissions 
)

int Tcl_Stat ( const char *  path,
struct stat *  oldStyleBuf 
)

int TclCrossFilesystemCopy ( Tcl_Interp interp,
Tcl_Obj source,
Tcl_Obj target 
)

void TclFinalizeFilesystem ( void   ) 

int TclFSCwdIsNative ( void   ) 

Definition at line 500 of file tclIOUtil.c.

References ThreadSpecificData::cwdClientData, TCL_TSD_INIT, and tclFsDataKey.

Referenced by TclNativeCreateNativeRep().

int TclFSEpochOk ( int  filesystemEpoch  ) 

int TclFSFileAttrIndex ( Tcl_Obj pathPtr,
const char *  attributeName,
int *  indexPtr 
)

Tcl_Obj* TclFSInternalToNormalized ( Tcl_Filesystem fromFilesystem,
ClientData  clientData,
FilesystemRecord **  fsRecPtrPtr 
)

Tcl_PathType TclFSNonnativePathType ( const char *  path,
int  pathLen,
Tcl_Filesystem **  filesystemPtrPtr,
int *  driveNameLengthPtr,
Tcl_Obj **  driveNameRef 
)

int TclFSNormalizeToUniquePath ( Tcl_Interp interp,
Tcl_Obj pathPtr,
int  startAt,
ClientData *  clientDataPtr 
)

int TclGetOpenMode ( Tcl_Interp interp,
const char *  modeString,
int *  seekFlagPtr 
)

Definition at line 1494 of file tclIOUtil.c.

References TclGetOpenModeEx().

int TclGetOpenModeEx ( Tcl_Interp interp,
const char *  modeString,
int *  seekFlagPtr,
int *  binaryPtr 
)

Tcl_PathType TclGetPathType ( Tcl_Obj pathPtr,
Tcl_Filesystem **  filesystemPtrPtr,
int *  driveNameLengthPtr,
Tcl_Obj **  driveNameRef 
)

int TclpLoadFile ( Tcl_Interp interp,
Tcl_Obj pathPtr,
const char *  sym1,
CONST char *  sym2,
Tcl_PackageInitProc **  proc1Ptr,
Tcl_PackageInitProc **  proc2Ptr,
ClientData *  clientDataPtr,
Tcl_FSUnloadFileProc **  unloadProcPtr 
)

Definition at line 3412 of file tclIOUtil.c.

References TCL_ERROR, TCL_OK, TclpDlopen(), and TclpFindSymbol().

void TclResetFilesystem ( void   ) 

Definition at line 844 of file tclIOUtil.c.

Referenced by Tcl_Finalize().


Variable Documentation

Definition at line 436 of file tclIOUtil.c.

Definition at line 353 of file tclIOUtil.c.

MODULE_SCOPE const TclFileAttrProcs tclpFileAttrProcs[]

Definition at line 53 of file tclIOUtil.c.

MODULE_SCOPE const char* tclpFileAttrStrings[]

Definition at line 52 of file tclIOUtil.c.

Tcl_FSFilesystemPathTypeProc TclpFilesystemPathType

Definition at line 328 of file tclIOUtil.c.

Tcl_FSMatchInDirectoryProc TclpMatchInDirectory

Definition at line 332 of file tclIOUtil.c.

Tcl_FSInternalToNormalizedProc TclpNativeToNormalized

Definition at line 329 of file tclIOUtil.c.

Referenced by TclpTempFileName().

Tcl_FSAccessProc TclpObjAccess

Definition at line 331 of file tclIOUtil.c.

Tcl_FSChdirProc TclpObjChdir

Definition at line 333 of file tclIOUtil.c.

Tcl_FSCopyDirectoryProc TclpObjCopyDirectory

Definition at line 339 of file tclIOUtil.c.

Tcl_FSCopyFileProc TclpObjCopyFile

Definition at line 335 of file tclIOUtil.c.

Tcl_FSCreateDirectoryProc TclpObjCreateDirectory

Definition at line 338 of file tclIOUtil.c.

Tcl_FSDeleteFileProc TclpObjDeleteFile

Definition at line 336 of file tclIOUtil.c.

Tcl_FSLinkProc TclpObjLink

Definition at line 342 of file tclIOUtil.c.

Tcl_FSListVolumesProc TclpObjListVolumes

Definition at line 343 of file tclIOUtil.c.

Tcl_FSLstatProc TclpObjLstat

Definition at line 334 of file tclIOUtil.c.

Tcl_FSRemoveDirectoryProc TclpObjRemoveDirectory

Definition at line 340 of file tclIOUtil.c.

Tcl_FSRenameFileProc TclpObjRenameFile

Definition at line 337 of file tclIOUtil.c.

Tcl_FSStatProc TclpObjStat

Definition at line 330 of file tclIOUtil.c.

Tcl_FSUnloadFileProc TclpUnloadFile

Definition at line 341 of file tclIOUtil.c.

Referenced by TclpDlopen().



Generated on Wed Mar 12 12:18:32 2008 by  doxygen 1.5.1