Module dryos
DryOS functions
Info:
- Copyright: 2014
- License: GPL
- Author: Magic Lantern Team
call (function[, arg]) |
Calls an eventproc (a function from the camera firmware which can be called by name). |
directory (path) |
Creates a directory object that is used to get information about a directory
This function does not actually create a directory on the file system, it just creates
an object that represents a directory. |
remove (filename) |
Deletes a file from the card. |
clock |
Get the value of the seconds clock |
ms_clock |
Get the value of the milliseconds clock |
prefix |
Get/Set the image filename prefix |
dcim_dir |
Get the DCIM directory |
config_dir |
Get the ML config directory |
ml_card |
Get the card ML started from |
shooting_card |
Get the shooting card |
date |
Gets a table representing the current date/time |
Functions
-
call (function[, arg])
-
Calls an eventproc (a function from the camera firmware which can be called by name).
See Eventprocs. Dangerous - you need to compile Lua yourself in order to enable it.
Parameters:
- function
string
the name of the function to call
- arg
argument to pass to the call
(optional)
-
directory (path)
-
Creates a directory object that is used to get information about a directory
This function does not actually create a directory on the file system, it just creates
an object that represents a directory. To actually create the directory in the file system
call directory:create()
Parameters:
Returns:
directory
Usage:
local mydir = dryos.directory("mydir")
if mydir.exists == false then
mydir:create()
end
for i,v in ipairs(mydir:files()) do
print("filename: "..v)
end
-
remove (filename)
-
Deletes a file from the card.
Parameters:
Returns:
bool
success
Fields
-
clock
-
Get the value of the seconds clock
-
ms_clock
-
Get the value of the milliseconds clock
-
prefix
-
Get/Set the image filename prefix
-
dcim_dir
-
Get the DCIM directory
-
config_dir
-
Get the ML config directory
-
ml_card
-
Get the card ML started from
-
shooting_card
-
Get the shooting card
-
date
-
Gets a table representing the current date/time
Class date
Represents a date/time
-
date.sec
-
Second
-
date.min
-
Minute
-
date.hour
-
Hour
-
date.day
-
Day
-
date.month
-
Month
-
date.year
-
Year
-
date.wday
-
Day of week
-
date.yday
-
Day of year
-
date.isdst
-
Daylight Savings
Class directory
Represents a directory
-
directory:create ()
-
Creates a directory
Returns:
bool
whether or not the directory was sucessfully created
-
directory:children ()
-
Get a table (of directory objects) containing this directory's child directories
Returns:
{directory,...}
-
directory:files ()
-
Get a table (of strings) that are the file names of this directory's files
Returns:
{string,...}
-
directory.path
-
Get the full path of the directory
-
directory.exists
-
Get whether or not the directory exists
-
directory.parent
-
Get a directory object that represents the current directory's parent
Class card
Represents a card (storage media)
Inherits from
directory
-
card.cluster_size
-
Get the cluster size
-
card.drive_letter
-
Get the drive letter
-
card.file_number
-
Get the current Canon file number
-
card.folder_number
-
Get the current Canon folder number
-
card.free_space
-
Get the current free space (in MiB)
-
card.type
-
Get the type of card