Module dryos

DryOS functions

Info:

  • Copyright: 2014
  • License: GPL
  • Author: Magic Lantern Team

Functions

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.

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

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

directory:create () Creates a directory
directory:children () Get a table (of directory objects) containing this directory's child directories
directory:files () Get a table (of strings) that are the file names of this directory's files
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

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


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
  • clock int
ms_clock
Get the value of the milliseconds clock
  • ms_clock int
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
  • shooting_card card
date
Gets a table representing the current date/time

Class date

Represents a date/time
date.sec
Second
  • sec int
date.min
Minute
  • min int
date.hour
Hour
  • hour int
date.day
Day
  • day int
date.month
Month
  • month int
date.year
Year
  • year int
date.wday
Day of week
  • wday int
date.yday
Day of year
  • yday int
date.isdst
Daylight Savings
  • isdst bool

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
  • exists bool
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
  • cluster_size int
card.drive_letter
Get the drive letter
card.file_number
Get the current Canon file number
  • file_number int
card.folder_number
Get the current Canon folder number
  • folder_number int
card.free_space
Get the current free space (in MiB)
  • free_space int
card.type
Get the type of card
generated by LDoc 1.4.3 Last updated 2016-04-23 15:53:20