Debian Codegraph @

generic/tclFileSystem.h

raw
1 /*
2 * tclFileSystem.h --
3 *
4 * This file contains the common definitions and prototypes for use by
5 * Tcl's filesystem and path handling layers.
6 *
7 * Copyright (c) 2003 Vince Darley.
8 *
9 * See the file "license.terms" for information on usage and redistribution of
10 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
11 */
12
13 #ifndef _TCLFILESYSTEM
14 #define _TCLFILESYSTEM
15
16 #include "tcl.h"
17
18 /*
19 * The internal TclFS API provides routines for handling and manipulating
20 * paths efficiently, taking direct advantage of the "path" Tcl_Obj type.
21 *
22 * These functions are not exported at all at present.
23 */
24
25 MODULE_SCOPE int TclFSCwdPointerEquals(Tcl_Obj **pathPtrPtr);
26 MODULE_SCOPE int TclFSNormalizeToUniquePath(Tcl_Interp *interp,
27 Tcl_Obj *pathPtr, int startAt);
28 MODULE_SCOPE Tcl_Obj * TclFSMakePathRelative(Tcl_Interp *interp,
29 Tcl_Obj *pathPtr, Tcl_Obj *cwdPtr);
30 MODULE_SCOPE int TclFSEnsureEpochOk(Tcl_Obj *pathPtr,
31 const Tcl_Filesystem **fsPtrPtr);
32 MODULE_SCOPE void TclFSSetPathDetails(Tcl_Obj *pathPtr,
33 const Tcl_Filesystem *fsPtr, ClientData clientData);
34 MODULE_SCOPE Tcl_Obj * TclFSNormalizeAbsolutePath(Tcl_Interp *interp,
35 Tcl_Obj *pathPtr);
36 MODULE_SCOPE size_t TclFSEpoch(void);
37
38 /*
39 * Private shared variables for use by tclIOUtil.c and tclPathObj.c
40 */
41
42 MODULE_SCOPE const Tcl_Filesystem tclNativeFilesystem;
43
44 /*
45 * Private shared functions for use by tclIOUtil.c, tclPathObj.c and
46 * tclFileName.c, and any platform-specific filesystem code.
47 */
48
49 MODULE_SCOPE Tcl_PathType TclFSGetPathType(Tcl_Obj *pathPtr,
50 const Tcl_Filesystem **filesystemPtrPtr,
51 int *driveNameLengthPtr);
52 MODULE_SCOPE Tcl_PathType TclFSNonnativePathType(const char *pathPtr,
53 int pathLen, const Tcl_Filesystem **filesystemPtrPtr,
54 int *driveNameLengthPtr, Tcl_Obj **driveNameRef);
55 MODULE_SCOPE Tcl_PathType TclGetPathType(Tcl_Obj *pathPtr,
56 const Tcl_Filesystem **filesystemPtrPtr,
57 int *driveNameLengthPtr, Tcl_Obj **driveNameRef);
58 MODULE_SCOPE int TclFSEpochOk(size_t filesystemEpoch);
59 MODULE_SCOPE int TclFSCwdIsNative(void);
60 MODULE_SCOPE Tcl_Obj * TclWinVolumeRelativeNormalize(Tcl_Interp *interp,
61 const char *path, Tcl_Obj **useThisCwdPtr);
62
63 MODULE_SCOPE Tcl_FSPathInFilesystemProc TclNativePathInFilesystem;
64 MODULE_SCOPE Tcl_FSCreateInternalRepProc TclNativeCreateNativeRep;
65
66 #endif /* _TCLFILESYSTEM */
67
68 /*
69 * Local Variables:
70 * mode: c
71 * c-basic-offset: 4
72 * fill-column: 78
73 * End:
74 */