5.4 Lua primer
107
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
mode
Meaning unclear
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
attrib
Bit mask of DOS attributes
is_dir
true
for a directory
is_file
true
for a 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)
Содержание Camera
Страница 1: ......
Страница 2: ...The Canon Camera Hackers Manual ...
Страница 3: ......
Страница 4: ...Berthold Daum The Canon Camera Hackers Manual Teach Your Camera New Tricks ...
Страница 19: ...10 CH APTER 2 Cameras and Operating Systems ...
Страница 25: ...16 CH APTER 3 ...
Страница 85: ...76 CH APTER 4 Teach Your Camera New Tricks ...
Страница 213: ...204 CH APTER 6 ...
Страница 253: ...244 AP PENDIX ...