libgphoto2 photo camera library (libgphoto2) API
2.5.10.1
|
#include "config.h"
#include <stdio.h>
#include <gphoto2/gphoto2-port.h>
#include <gphoto2/gphoto2-port-result.h>
#include <gphoto2/gphoto2-port-portability.h>
Functions | |
int | gp_system_mkdir (const char *dirname) |
mkdir UNIX functionality More... | |
int | gp_system_rmdir (const char *dirname) |
rmdir UNIX functionality More... | |
gp_system_dir | gp_system_opendir (const char *dirname) |
opendir UNIX functionality More... | |
gp_system_dirent | gp_system_readdir (gp_system_dir d) |
readdir UNIX functionality More... | |
const char * | gp_system_filename (gp_system_dirent de) |
retrieve UNIX filename out of a directory entry More... | |
int | gp_system_closedir (gp_system_dir dir) |
closedir UNIX functionality More... | |
int | gp_system_is_file (const char *filename) |
check if passed filename is a file More... | |
int | gp_system_is_dir (const char *dirname) |
check if passed filename is a directory More... | |
This file contains various portability functions that make non UNIX (Windows) ports easier.
int gp_system_closedir | ( | gp_system_dir | dir | ) |
closedir UNIX functionality
dir | directory to close |
Closes a directory after readdir operations.
References GP_OK.
const char* gp_system_filename | ( | gp_system_dirent | de | ) |
retrieve UNIX filename out of a directory entry
de | directory entry as returned from gp_system_readdir() |
Extracts a filename out of the passed directory entry.
int gp_system_is_dir | ( | const char * | dirname | ) |
check if passed filename is a directory
dirname | file name to check |
Checks whether the passed in dirname is a directory and returns this as boolean.
int gp_system_is_file | ( | const char * | filename | ) |
check if passed filename is a file
filename | file name to check |
Checks whether the passed in filename is a file and returns this as boolean.
int gp_system_mkdir | ( | const char * | dirname | ) |
mkdir UNIX functionality
dirname | directory to create |
Creates a new directory.
References GP_ERROR, and GP_OK.
Referenced by gp_setting_set().
gp_system_dir gp_system_opendir | ( | const char * | dirname | ) |
opendir UNIX functionality
dirname | directory to open |
Opens a directory for readdir and later closedir operations, to enumerate its contents.
gp_system_dirent gp_system_readdir | ( | gp_system_dir | d | ) |
readdir UNIX functionality
d | directory to enumerate |
Reads one directory entry from the specified directory handle as returned from gp_system_opendir(). Use gp_system_filename() to extract the filename from the returned value.