1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
-
+
|
/*
* tclUnixFile.c --
*
* This file contains wrappers around UNIX file handling functions.
* These wrappers mask differences between Windows and UNIX.
*
* Copyright (c) 1995-1998 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* RCS: @(#) $Id: tclUnixFile.c,v 1.13 2001/10/29 14:25:03 dkf Exp $
* RCS: @(#) $Id: tclUnixFile.c,v 1.14 2002/01/17 04:37:33 dgp Exp $
*/
#include "tclInt.h"
#include "tclPort.h"
/*
|
| ︙ | | |
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
|
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
|
-
+
|
*/
int
TclpObjAccess(pathPtr, mode)
Tcl_Obj *pathPtr; /* Path of file to access */
int mode; /* Permission setting. */
{
char *path = Tcl_FSGetNativePath(pathPtr);
CONST char *path = Tcl_FSGetNativePath(pathPtr);
if (path == NULL) {
return -1;
} else {
return access(path, mode);
}
}
|
| ︙ | | |
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
|
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
|
-
+
|
*---------------------------------------------------------------------------
*/
int
TclpObjChdir(pathPtr)
Tcl_Obj *pathPtr; /* Path to new working directory */
{
char *path = Tcl_FSGetNativePath(pathPtr);
CONST char *path = Tcl_FSGetNativePath(pathPtr);
if (path == NULL) {
return -1;
} else {
return chdir(path);
}
}
|
| ︙ | | |
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
|
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
|
-
+
|
*/
int
TclpObjLstat(pathPtr, bufPtr)
Tcl_Obj *pathPtr; /* Path of file to stat */
struct stat *bufPtr; /* Filled with results of stat call. */
{
char *path = Tcl_FSGetNativePath(pathPtr);
CONST char *path = Tcl_FSGetNativePath(pathPtr);
if (path == NULL) {
return -1;
} else {
return lstat(path, bufPtr);
}
}
|
| ︙ | | |
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
|
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
|
-
+
|
*/
int
TclpObjStat(pathPtr, bufPtr)
Tcl_Obj *pathPtr; /* Path of file to stat */
struct stat *bufPtr; /* Filled with results of stat call. */
{
char *path = Tcl_FSGetNativePath(pathPtr);
CONST char *path = Tcl_FSGetNativePath(pathPtr);
if (path == NULL) {
return -1;
} else {
return stat(path, bufPtr);
}
}
|
| ︙ | | |