webmcp

diff libraries/extos/extos.autodoc.lua @ 344:985ffb3ef69f

Added new function extos.stat(...)
author jbe
date Thu Mar 26 02:11:59 2015 +0100 (2015-03-26)
parents 599b8463b985
children 546ec50e7170
line diff
     1.1 --- a/libraries/extos/extos.autodoc.lua	Thu Mar 26 01:56:10 2015 +0100
     1.2 +++ b/libraries/extos/extos.autodoc.lua	Thu Mar 26 02:11:59 2015 +0100
     1.3 @@ -20,6 +20,43 @@
     1.4  
     1.5  
     1.6  --[[--
     1.7 +filestat_table,  -- table with information on the file
     1.8 +errmsg =         -- error message if file information could not be read
     1.9 +extos.stat(
    1.10 +  filename       -- path to a file on the file system
    1.11 +)
    1.12 +
    1.13 +Return information on a file. The returned table contains the following fields:
    1.14 +
    1.15 +- "dev" (numeric ID of the device containing the file)
    1.16 +- "ino" (file's inode number)
    1.17 +- "nlink" (number of hard links to the file)
    1.18 +- "atime" (time when file data was last accessed)
    1.19 +- "mtime" (time when file data was last modified)
    1.20 +- "ctime" (time when file status was last changed)
    1.21 +- "size" (file size in bytes)
    1.22 +- "blksize" (optimal I/O block size for the file)
    1.23 +- "blocks" (actual number of blocks allocated for the file in 512-byte units)
    1.24 +- "uid" (user ID of the file's owner)
    1.25 +- "gid" (group ID of the file)
    1.26 +- "mode" (bitfield including the access permissions)
    1.27 +- "isblk" (true if block special file)
    1.28 +- "ischr" (true if character special file)
    1.29 +- "isdir" (true if directory)
    1.30 +- "isfifo" (true if pope of FIFO special file)
    1.31 +- "islnk" (true if symbolic link)
    1.32 +- "isreg" (true if regular file)
    1.33 +- "issock" (true if socket)
    1.34 +
    1.35 +On error, nil and an error message are returned.
    1.36 +
    1.37 +--]]--
    1.38 +-- implemented in extos.c as
    1.39 +-- static int extos_stat(lua_State *L)
    1.40 +--//--
    1.41 +
    1.42 +
    1.43 +--[[--
    1.44  directory_entries =  -- table of directory entries
    1.45  extos.listdir{
    1.46    path = path        -- path name

Impressum / About Us