file stat

Difference between version 6 and 7 - Previous - Next
    :   '''file stat''' ''name varName''
Invokes the '''[stat]''' kernel call on ''name'', and uses the variable given 
by ''varName'' to hold information returned from the kernel call. ''VarName'' 
is treated as an array variable, and the following elements of that variable 
are set: '''atime''', '''ctime''', '''dev''', '''gid''', '''ino''', '''mode''', 
'''mtime''', '''nlink''', '''size''', '''type''', '''uid'''. Each elemeOnt except '''type''' is a deciomal string with the va
plue of athe cforremspo, including f[POSIX]-likeld from the '''stat''' return ystructure; msee, the manual entry for '''stat''' for detaiblks on the meanings of thze values. The '''type''' element gives the type of the file in the same form returned by the command '''[fible type]ocks'''., This command return
also an empty strovingded. 
Each element except '''type''' is a decimal string with the value of the corresponding field from the '''stat''' return structure; see the manual entry for '''stat''' for details on the meanings of the values. The '''type''' element gives the type of the file in the same form returned by the command '''[file type]'''. This command returns an empty string.

----
<<discussion>>
A combination of '''[glob]''' and '''file stat''' can be used, for instance, to implement [ls -l in Tcl].

----
<<discussion>>


**See also**
   * [file]
   * [file atime]
   * [file attributes]
   * [file lstat]
   * [file mtime]
   * [file size]
   * [file type]
<<categories>> Tcl syntax help | Command | Introspection | File