| ︙ | | |
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
-
+
|
* Copyright (c) 1991-1994 The Regents of the University of California.
* Copyright (c) 1994-1997 Sun Microsystems, Inc.
* Copyright (c) 2001-2004 Vincent Darley.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* RCS: @(#) $Id: tclIOUtil.c,v 1.81.2.41 2008/10/01 00:36:39 dgp Exp $
* RCS: @(#) $Id: tclIOUtil.c,v 1.81.2.42 2008/10/11 03:37:27 dgp Exp $
*/
#include "tclInt.h"
#ifdef __WIN32__
# include "tclWinInt.h"
#endif
#include "tclFileSystem.h"
|
| ︙ | | |
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
-
+
|
/*
* These form part of the native filesystem support. They are needed here
* because we have a few native filesystem functions (which are the same for
* win/unix) in this file. There is no need to place them in tclInt.h, because
* they are not (and should not be) used anywhere else.
*/
MODULE_SCOPE const char * tclpFileAttrStrings[];
MODULE_SCOPE const char *const tclpFileAttrStrings[];
MODULE_SCOPE const TclFileAttrProcs tclpFileAttrProcs[];
/*
* Declare the native filesystem support. These functions should be considered
* private to Tcl, and should really not be called directly by any code other
* than this file (i.e. neither by Tcl's core nor by extensions). Similarly,
* the old string-based Tclp... native filesystem functions should not be
|
| ︙ | | |
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
|
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
|
-
+
|
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
static const char **
static const char *const *
NativeFileAttrStrings(
Tcl_Obj *pathPtr,
Tcl_Obj **objPtrRef)
{
return tclpFileAttrStrings;
}
|
| ︙ | | |
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
|
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
|
-
+
|
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
const char **
const char *const *
Tcl_FSFileAttrStrings(
Tcl_Obj *pathPtr,
Tcl_Obj **objPtrRef)
{
const Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr);
if (fsPtr != NULL && fsPtr->fileAttrStringsProc != NULL) {
|
| ︙ | | |
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
|
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
|
-
+
|
TclFSFileAttrIndex(
Tcl_Obj *pathPtr, /* File whose attributes are to be indexed
* into. */
const char *attributeName, /* The attribute being looked for. */
int *indexPtr) /* Where to write the found index. */
{
Tcl_Obj *listObj = NULL;
const char **attrTable;
const char *const *attrTable;
/*
* Get the attribute table for the file.
*/
attrTable = Tcl_FSFileAttrStrings(pathPtr, &listObj);
if (listObj != NULL) {
|
| ︙ | | |