June 2000
Intermediate to advanced
556 pages
8h 45m
English
Before we delve into the code of xFS, we will take a look at some Python features that we have not yet encountered.
The xFS application code makes use of a function in Python's standard os module called stat. Given a filename, the stat function returns a list containing 10 useful pieces of information about the file.
CD-ROM reference=13003.txt >>> import os >>> os.stat("xmlc.c") (33206, 0, 2, 1, 0, 0, 4382, 934758000, 928768362, 928768947)
A quick way to find out what each of the numbers means is to print out the docstring for the stat function:
CD-ROM reference=13004.txt
>>> print os.stat.__doc__ stat(path) --> (mode,ino,dev,nlink,uid,gid,size,atime,mtime,ctime) ...Read now
Unlock full access