File: Stat.c

package info (click to toggle)
mlton 20041109-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 18,212 kB
  • ctags: 58,085
  • sloc: ansic: 10,386; makefile: 1,178; sh: 1,139; pascal: 256; asm: 97
file content (59 lines) | stat: -rw-r--r-- 971 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#include "platform.h"

static struct stat statbuf;

Word Posix_FileSys_Stat_dev () {
	return statbuf.st_dev;
}

Int Posix_FileSys_Stat_ino () {
	return statbuf.st_ino;
}

Word Posix_FileSys_Stat_mode () {
	return statbuf.st_mode;
}

Int Posix_FileSys_Stat_nlink () {
	return statbuf.st_nlink;
}

Word Posix_FileSys_Stat_uid () {
	return statbuf.st_uid;
}

Word Posix_FileSys_Stat_gid () {
	return statbuf.st_gid;
}

Word Posix_FileSys_Stat_rdev () {
	return statbuf.st_rdev;
}

Position Posix_FileSys_Stat_size () {
	return statbuf.st_size;
}

Int Posix_FileSys_Stat_atime () {
	return statbuf.st_atime;
}

Int Posix_FileSys_Stat_mtime () {
	return statbuf.st_mtime;
}

Int Posix_FileSys_Stat_ctime () {
	return statbuf.st_ctime;
}

Int Posix_FileSys_Stat_fstat (Fd f) {
	return fstat (f, &statbuf);
}

Int Posix_FileSys_Stat_lstat (NullString f) {
	return lstat ((char*)f, &statbuf);
}

Int Posix_FileSys_Stat_stat (NullString f) {	
	return stat ((char*)f, &statbuf);
}