![]() | ![]() | ![]() | The Canon driver reference | ![]() |
---|
#include <canon.h> int canon_int_directory_operations (Camera *camera, const char *path, canonDirFunctionCode action, GPContext *context); enum canonDirFunctionCode; int canon_int_list_directory (Camera *camera, const char *folder, CameraList *list, const canonDirlistFunctionBits flags, GPContext *context); enum canonDirlistFunctionBits;
int canon_int_directory_operations (Camera *camera, const char *path, canonDirFunctionCode action, GPContext *context);
Creates or removes a directory in camera storage.
camera : | Camera to work on |
path : | Path to directory on which to operate |
action : | canonDirFunctionCode (either DIR_CREATE or DIR_REMOVE) |
context : | context for error reporting |
Returns : | gphoto2 status code. GP_OK on success, otherwise status
from |
typedef enum { DIR_CREATE = 0, DIR_REMOVE = 1 } canonDirFunctionCode;
Software code to pass to canon_int_directory_operations()
.
DIR_CREATE | Create the specified directory |
DIR_REMOVE | Remove the specified directory |
int canon_int_list_directory (Camera *camera, const char *folder, CameraList *list, const canonDirlistFunctionBits flags, GPContext *context);
Gets the directory tree of a given flash device, unsorted and with a few missing features (such as correct sorting of files and correctly associating files with each other).
Implicitly assumes that uint8_t[] is a char[] for strings.
camera : | Camera to access |
folder : | Folder on the camera to list |
list : | Returns list of folders in this directory |
flags : | canonDirlistFunctionBits specifying to list files, folders, or both |
context : | context for error reporting |
Returns : | a gphoto2 status code.
|
typedef enum { CANON_LIST_FILES = 2, CANON_LIST_FOLDERS = 4 } canonDirlistFunctionBits;
Software bits to pass in "flags" argument to
canon_int_list_directory()
, telling what to list. Bits may be ORed
together to list both files and folders.
CANON_LIST_FILES | List files |
CANON_LIST_FOLDERS | List folders |
<<< Handling Camera Directories | Directory Entries >>> |