Canon Camera Hackers Manual page 116

Camera hackers manual berthold daum
Table of Contents

Advertisement

r, msg, no = os.mkdir(dirname)
creates a new directory with a specified path name such as "A:/CHDK/
WORK". Please note that the path name must not end with a slash. If the
function succeeds, true is returned. If it fails, nil is returned, followed by
an error message and an error number.
t, msg, no = os.stat(filename)
delivers a table t containing information about the specified file.
Key
Value
dev
Device number
Meaning unclear
mode
size
Size in bytes
atime
Last access time
mtime
Last modification
ctime
Last status change
blksize
Block size in bytes
blocks
Number of blocks in the file
Bit mask of DOS attributes
attrib
is_dir
true for a directory
true for a file
is_file
If the function fails, nil is returned, followed by an error message and an
error number.
r, msg, no =
os.utime(filename,atime,mtime)
sets the time of last access and the time of last modification for the speci-
fied file. If atime or mtime is omitted or nil, the current time is used. If the
function succeeds, true is returned. If it fails, nil is returned, followed by
an error message and an error number.
t, msg, no =
os.listdir(dirpath,showall)
107
5.4 Lua primer

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Powershot sx10 is

Table of Contents