Added (file-ctime filename) which returns the time of last change

(in nanoseconds)
This commit is contained in:
Abdulaziz Ghuloum
2008-02-18 21:58:11 -05:00
parent e751c15bc4
commit 8a809e2f58
8 changed files with 104 additions and 17 deletions
+12
View File
@@ -186,3 +186,15 @@ ikrt_tcp_connect_nonblocking(ikptr host, ikptr srvc, ikpcb* pcb){
return fdptr;
}
ikptr
ikrt_file_ctime(ikptr filename, ikptr res){
struct stat s;
int err = stat((char*)(filename + off_bytevector_data), &s);
if(err) {
return fix(errno);
}
ref(res, off_car) = fix(s.st_ctimespec.tv_sec);
ref(res, off_cdr) = fix(s.st_ctimespec.tv_nsec);
return fix(0);
}