# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info
if _swig_python_version_info >= (3, 0, 0):
    new_instancemethod = lambda func, inst, cls: _filesys.SWIG_PyInstanceMethod_New(func)
else:
    from new import instancemethod as new_instancemethod
if _swig_python_version_info >= (2, 7, 0):
    def swig_import_helper():
        import importlib
        pkg = __name__.rpartition('.')[0]
        mname = '.'.join((pkg, '_filesys')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_filesys')
    _filesys = swig_import_helper()
    del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_filesys', [dirname(__file__)])
        except ImportError:
            import _filesys
            return _filesys
        try:
            _mod = imp.load_module('_filesys', fp, pathname, description)
        finally:
            if fp is not None:
                fp.close()
        return _mod
    _filesys = swig_import_helper()
    del swig_import_helper
else:
    import _filesys
del _swig_python_version_info

try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
    if (name == "thisown"):
        return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name, None)
    if method:
        return method(self, value)
    if (not static):
        object.__setattr__(self, name, value)
    else:
        raise AttributeError("You cannot add attributes to %s" % self)


def _swig_setattr(self, class_type, name, value):
    return _swig_setattr_nondynamic(self, class_type, name, value, 0)


def _swig_getattr(self, class_type, name):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))


def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_method(set):
    def set_attr(self, name, value):
        if (name == "thisown"):
            return self.this.own(value)
        if hasattr(self, name) or (name == "this"):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add attributes to %s" % self)
    return set_attr


import gphoto2.abilities_list
import gphoto2.camera
import gphoto2.context
import gphoto2.file
import gphoto2.list
import gphoto2.port_info_list
import gphoto2.port_log
import gphoto2.result
import gphoto2.version
import gphoto2.widget
class _CameraFilesystem(object):
    """
    The internal camera filesystem structure.  

    The internals of the CameraFilesystem are only visible to gphoto2. You
    can only access them using the functions provided by gphoto2.
    """

    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self):
        """
        __init__(self) -> _CameraFilesystem

        The internal camera filesystem structure.  

        The internals of the CameraFilesystem are only visible to gphoto2. You
        can only access them using the functions provided by gphoto2.
        """
        _filesys._CameraFilesystem_swiginit(self, _filesys.new__CameraFilesystem())
    __swig_destroy__ = _filesys.delete__CameraFilesystem
_CameraFilesystem_swigregister = _filesys._CameraFilesystem_swigregister
_CameraFilesystem_swigregister(_CameraFilesystem)

GP_FILE_INFO_NONE = _filesys.GP_FILE_INFO_NONE
GP_FILE_INFO_TYPE = _filesys.GP_FILE_INFO_TYPE
GP_FILE_INFO_SIZE = _filesys.GP_FILE_INFO_SIZE
GP_FILE_INFO_WIDTH = _filesys.GP_FILE_INFO_WIDTH
GP_FILE_INFO_HEIGHT = _filesys.GP_FILE_INFO_HEIGHT
GP_FILE_INFO_PERMISSIONS = _filesys.GP_FILE_INFO_PERMISSIONS
GP_FILE_INFO_STATUS = _filesys.GP_FILE_INFO_STATUS
GP_FILE_INFO_MTIME = _filesys.GP_FILE_INFO_MTIME
GP_FILE_INFO_ALL = _filesys.GP_FILE_INFO_ALL
GP_FILE_PERM_NONE = _filesys.GP_FILE_PERM_NONE
GP_FILE_PERM_READ = _filesys.GP_FILE_PERM_READ
GP_FILE_PERM_DELETE = _filesys.GP_FILE_PERM_DELETE
GP_FILE_PERM_ALL = _filesys.GP_FILE_PERM_ALL
GP_FILE_STATUS_NOT_DOWNLOADED = _filesys.GP_FILE_STATUS_NOT_DOWNLOADED
GP_FILE_STATUS_DOWNLOADED = _filesys.GP_FILE_STATUS_DOWNLOADED
class CameraFileInfoFile(object):
    """
    File information of a regular file.  

    Contains information a regular file with fields being set depending on
    the bitmask in the fields member.  

    C++ includes: gphoto2-filesys.h
    """

    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    fields = _swig_property(_filesys.CameraFileInfoFile_fields_get)
    status = _swig_property(_filesys.CameraFileInfoFile_status_get)
    size = _swig_property(_filesys.CameraFileInfoFile_size_get)
    type = _swig_property(_filesys.CameraFileInfoFile_type_get)
    width = _swig_property(_filesys.CameraFileInfoFile_width_get)
    height = _swig_property(_filesys.CameraFileInfoFile_height_get)
    permissions = _swig_property(_filesys.CameraFileInfoFile_permissions_get)
    mtime = _swig_property(_filesys.CameraFileInfoFile_mtime_get)
    __swig_destroy__ = _filesys.delete_CameraFileInfoFile
CameraFileInfoFile_swigregister = _filesys.CameraFileInfoFile_swigregister
CameraFileInfoFile_swigregister(CameraFileInfoFile)

class CameraFileInfoPreview(object):
    """
    File information of a preview file.  

    Contains information of a preview file with fields being set depending
    on the bitmask in the fields member.  

    C++ includes: gphoto2-filesys.h
    """

    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    fields = _swig_property(_filesys.CameraFileInfoPreview_fields_get)
    status = _swig_property(_filesys.CameraFileInfoPreview_status_get)
    size = _swig_property(_filesys.CameraFileInfoPreview_size_get)
    type = _swig_property(_filesys.CameraFileInfoPreview_type_get)
    width = _swig_property(_filesys.CameraFileInfoPreview_width_get)
    height = _swig_property(_filesys.CameraFileInfoPreview_height_get)
    __swig_destroy__ = _filesys.delete_CameraFileInfoPreview
CameraFileInfoPreview_swigregister = _filesys.CameraFileInfoPreview_swigregister
CameraFileInfoPreview_swigregister(CameraFileInfoPreview)

class CameraFileInfoAudio(object):
    """
    File information of an audio file.  

    Contains information of an audio file with fields being set depending on
    the bitmask in the fields member.  

    C++ includes: gphoto2-filesys.h
    """

    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    fields = _swig_property(_filesys.CameraFileInfoAudio_fields_get)
    status = _swig_property(_filesys.CameraFileInfoAudio_status_get)
    size = _swig_property(_filesys.CameraFileInfoAudio_size_get)
    type = _swig_property(_filesys.CameraFileInfoAudio_type_get)
    __swig_destroy__ = _filesys.delete_CameraFileInfoAudio
CameraFileInfoAudio_swigregister = _filesys.CameraFileInfoAudio_swigregister
CameraFileInfoAudio_swigregister(CameraFileInfoAudio)

class CameraFileInfo(object):
    """
    File information structure.  

    Contains the normal, preview and audio file information structures for a
    specific file.  

    C++ includes: gphoto2-filesys.h
    """

    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    preview = _swig_property(_filesys.CameraFileInfo_preview_get)
    file = _swig_property(_filesys.CameraFileInfo_file_get)
    audio = _swig_property(_filesys.CameraFileInfo_audio_get)
    __swig_destroy__ = _filesys.delete_CameraFileInfo
CameraFileInfo_swigregister = _filesys.CameraFileInfo_swigregister
CameraFileInfo_swigregister(CameraFileInfo)

GP_STORAGEINFO_BASE = _filesys.GP_STORAGEINFO_BASE
GP_STORAGEINFO_LABEL = _filesys.GP_STORAGEINFO_LABEL
GP_STORAGEINFO_DESCRIPTION = _filesys.GP_STORAGEINFO_DESCRIPTION
GP_STORAGEINFO_ACCESS = _filesys.GP_STORAGEINFO_ACCESS
GP_STORAGEINFO_STORAGETYPE = _filesys.GP_STORAGEINFO_STORAGETYPE
GP_STORAGEINFO_FILESYSTEMTYPE = _filesys.GP_STORAGEINFO_FILESYSTEMTYPE
GP_STORAGEINFO_MAXCAPACITY = _filesys.GP_STORAGEINFO_MAXCAPACITY
GP_STORAGEINFO_FREESPACEKBYTES = _filesys.GP_STORAGEINFO_FREESPACEKBYTES
GP_STORAGEINFO_FREESPACEIMAGES = _filesys.GP_STORAGEINFO_FREESPACEIMAGES
GP_STORAGEINFO_ST_UNKNOWN = _filesys.GP_STORAGEINFO_ST_UNKNOWN
GP_STORAGEINFO_ST_FIXED_ROM = _filesys.GP_STORAGEINFO_ST_FIXED_ROM
GP_STORAGEINFO_ST_REMOVABLE_ROM = _filesys.GP_STORAGEINFO_ST_REMOVABLE_ROM
GP_STORAGEINFO_ST_FIXED_RAM = _filesys.GP_STORAGEINFO_ST_FIXED_RAM
GP_STORAGEINFO_ST_REMOVABLE_RAM = _filesys.GP_STORAGEINFO_ST_REMOVABLE_RAM
GP_STORAGEINFO_AC_READWRITE = _filesys.GP_STORAGEINFO_AC_READWRITE
GP_STORAGEINFO_AC_READONLY = _filesys.GP_STORAGEINFO_AC_READONLY
GP_STORAGEINFO_AC_READONLY_WITH_DELETE = _filesys.GP_STORAGEINFO_AC_READONLY_WITH_DELETE
GP_STORAGEINFO_FST_UNDEFINED = _filesys.GP_STORAGEINFO_FST_UNDEFINED
GP_STORAGEINFO_FST_GENERICFLAT = _filesys.GP_STORAGEINFO_FST_GENERICFLAT
GP_STORAGEINFO_FST_GENERICHIERARCHICAL = _filesys.GP_STORAGEINFO_FST_GENERICHIERARCHICAL
GP_STORAGEINFO_FST_DCF = _filesys.GP_STORAGEINFO_FST_DCF
class CameraStorageInformation(object):
    """
    Storage information structue.  

    This structure contains the information of a specific camera storage.
    Only the members as specified by the *fields* member are valid.  

    C++ includes: gphoto2-filesys.h
    """

    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    fields = _swig_property(_filesys.CameraStorageInformation_fields_get)
    basedir = _swig_property(_filesys.CameraStorageInformation_basedir_get)
    label = _swig_property(_filesys.CameraStorageInformation_label_get)
    description = _swig_property(_filesys.CameraStorageInformation_description_get)
    type = _swig_property(_filesys.CameraStorageInformation_type_get)
    fstype = _swig_property(_filesys.CameraStorageInformation_fstype_get)
    access = _swig_property(_filesys.CameraStorageInformation_access_get)
    capacitykbytes = _swig_property(_filesys.CameraStorageInformation_capacitykbytes_get)
    freekbytes = _swig_property(_filesys.CameraStorageInformation_freekbytes_get)
    freeimages = _swig_property(_filesys.CameraStorageInformation_freeimages_get)
    __swig_destroy__ = _filesys.delete_CameraStorageInformation
CameraStorageInformation_swigregister = _filesys.CameraStorageInformation_swigregister
CameraStorageInformation_swigregister(CameraStorageInformation)


def gp_filesystem_new() -> "CameraFilesystem **":
    """
    gp_filesystem_new() -> int

    Create a new filesystem struct.  

    Parameters
    ----------
    * `fs` :  
        a pointer to a CameraFilesystem  

    Creates a new empty CameraFilesystem  

    Returns
    -------
    a gphoto2 error code.
    """
    return _filesys.gp_filesystem_new()

def gp_filesystem_append(*args) -> "int":
    """
    gp_filesystem_append(fs, folder, filename, context) -> int

    Parameters
    ----------
    fs: gphoto2.CameraFilesystem
    folder: str
    filename: str
    context: gphoto2.Context (default=None)

    """
    return _filesys.gp_filesystem_append(*args)

def gp_filesystem_set_info_noop(*args) -> "int":
    """
    gp_filesystem_set_info_noop(fs, folder, filename, info, context) -> int

    Parameters
    ----------
    fs: gphoto2.CameraFilesystem
    folder: str
    filename: str
    info: gphoto2.CameraFileInfo
    context: gphoto2.Context (default=None)


    Store the file information in the virtual fs.  

    Parameters
    ----------
    * `fs` :  
        a CameraFilesystem  
    * `folder` :  
        the foldername  
    * `info` :  
        the CameraFileInfo to store  
    * `context` :  
        a GPContext  

    In contrast to gp_filesystem_set_info, gp_filesystem_set_info_noop will
    only change the file information in the fs. Typically, camera drivers
    will use this function in case they get file information "for free" on
    gp_camera_capture or gp_camera_folder_list_files.  

    Returns
    -------
    a gphoto2 error code
    """
    return _filesys.gp_filesystem_set_info_noop(*args)

def gp_filesystem_set_file_noop(*args) -> "int":
    """
    gp_filesystem_set_file_noop(fs, folder, filename, type, file, context) -> int

    Parameters
    ----------
    fs: gphoto2.CameraFilesystem
    folder: str
    filename: str
    type: CameraFileType (gphoto2.GP_FILE_TYPE_PREVIEW etc.)
    file: gphoto2.CameraFile
    context: gphoto2.Context (default=None)


    Attach file content to a specified file.  

    Parameters
    ----------
    * `fs` :  
        a CameraFilesystem  
    * `folder` :  
        a folder in the filesystem  
    * `file` :  
        a CameraFile  
    * `context` :  
        a GPContext  

    Tells the fs about a file. Typically, camera drivers will call this
    function in case they get information about a file (i.e. preview) "for
    free" on gp_camera_capture() or gp_camera_folder_list_files().  

    Returns
    -------
    a gphoto2 error code.
    """
    return _filesys.gp_filesystem_set_file_noop(*args)

def gp_filesystem_delete_file_noop(*args) -> "int":
    """
    gp_filesystem_delete_file_noop(fs, folder, filename, context) -> int

    Parameters
    ----------
    fs: gphoto2.CameraFilesystem
    folder: str
    filename: str
    context: gphoto2.Context (default=None)


    Delete a virtal file from a folder in the filesystem.  

    Parameters
    ----------
    * `fs` :  
        a CameraFilesystem  
    * `folder` :  
        a folder in which to delete the file  
    * `filename` :  
        the name of the file to delete  
    * `context` :  
        a GPContext  

    Remove a file from the filesystem. Compared to
    gp_filesystem_delete_file() this just removes the file from the
    libgphoto2 view of the filesystem, but does not call the camera driver
    to delete it from the physical device.  

    Returns
    -------
    a gphoto2 error code.
    """
    return _filesys.gp_filesystem_delete_file_noop(*args)

def gp_filesystem_reset(fs: '_CameraFilesystem') -> "int":
    """
    gp_filesystem_reset(fs) -> int

    Parameters
    ----------
    fs: gphoto2.CameraFilesystem


    Clear the filesystem.  

    Parameters
    ----------
    * `fs` :  
        the filesystem to be cleared  

    Resets the filesystem. All cached information including the folder tree
    will get lost and will be queried again on demand.  

    Returns
    -------
    a gphoto2 error code.
    """
    return _filesys.gp_filesystem_reset(fs)

def gp_filesystem_count(*args) -> "int":
    """
    gp_filesystem_count(fs, folder, context) -> int

    Parameters
    ----------
    fs: gphoto2.CameraFilesystem
    folder: str
    context: gphoto2.Context (default=None)


    Count files a folder of a filesystem.  

    Parameters
    ----------
    * `fs` :  
        a CameraFilesystem  
    * `folder` :  
        a folder in which to count the files  
    * `context` :  
        a GPContext  

    Counts the files in the folder.  

    Returns
    -------
    The number of files in the folder or a gphoto2 error code.
    """
    return _filesys.gp_filesystem_count(*args)

def gp_filesystem_name(*args) -> "char **":
    """
    gp_filesystem_name(fs, folder, filenumber, context) -> int

    Parameters
    ----------
    fs: gphoto2.CameraFilesystem
    folder: str
    filenumber: int
    context: gphoto2.Context (default=None)


    Lookup the filename of an indexed file within a folder.  

    Parameters
    ----------
    * `fs` :  
        a CameraFilesystem  
    * `folder` :  
        the folder where to look up the file with the filenumber  
    * `filenumber` :  
        the number of the file  
    * `filename` :  
        pointer to a filename where the result is stored  
    * `context` :  
        a GPContext  

    Looks up the filename of file with given filenumber in given folder. See
    gp_filesystem_number for exactly the opposite functionality.  

    Returns
    -------
    a gphoto2 error code.
    """
    return _filesys.gp_filesystem_name(*args)

def gp_filesystem_get_folder(*args) -> "char **":
    """
    gp_filesystem_get_folder(fs, filename, context) -> int

    Parameters
    ----------
    fs: gphoto2.CameraFilesystem
    filename: str
    context: gphoto2.Context (default=None)


    Search a folder that contains a given filename.  

    Parameters
    ----------
    * `fs` :  
        a CameraFilesystem  
    * `filename` :  
        the name of the file to search in the fs  
    * `folder` :  
        pointer to value where the string is stored in  
    * `context` :  
        a GPContext  

    Searches a file called filename in the fs and returns the first
    occurrency. This functionality is needed for camera drivers that cannot
    figure out where a file gets created after capturing an image although
    the name of the image is known. Usually, those drivers will call
    gp_filesystem_reset in order to tell the fs that something has changed
    and then gp_filesystem_get_folder in order to find the file.  

    Note that you get a reference to the string stored in the filesystem
    structure, so do not free it yourself.  

    Returns
    -------
    a gphoto2 error code.
    """
    return _filesys.gp_filesystem_get_folder(*args)

def gp_filesystem_number(*args) -> "int":
    """
    gp_filesystem_number(fs, folder, filename, context) -> int

    Parameters
    ----------
    fs: gphoto2.CameraFilesystem
    folder: str
    filename: str
    context: gphoto2.Context (default=None)


    Get the index of a file in specified folder.  

    Parameters
    ----------
    * `fs` :  
        a CameraFilesystem  
    * `folder` :  
        the folder where to look for file called filename  
    * `filename` :  
        the file to look for  
    * `context` :  
        a GPContext  

    Looks for a file called filename in the given folder. See
    gp_filesystem_name for exactly the opposite functionality.  

    Returns
    -------
    a gphoto2 error code.
    """
    return _filesys.gp_filesystem_number(*args)

def gp_filesystem_list_files(*args) -> "CameraList *":
    """
    gp_filesystem_list_files(fs, folder, context) -> int

    Parameters
    ----------
    fs: gphoto2.CameraFilesystem
    folder: str
    context: gphoto2.Context (default=None)


    Get the list of files in a folder.  

    Parameters
    ----------
    * `fs` :  
        a CameraFilesystem  
    * `folder` :  
        a folder of which a file list should be generated  
    * `list` :  
        a CameraList where to put the list of files into  
    * `context` :  
        a GPContext  

    Lists the files in folder using either cached values or (if there aren't
    any) the file_list_func which (hopefully) has been previously supplied.  

    Returns
    -------
    a gphoto2 error code.
    """
    return _filesys.gp_filesystem_list_files(*args)

def gp_filesystem_list_folders(*args) -> "CameraList *":
    """
    gp_filesystem_list_folders(fs, folder, context) -> int

    Parameters
    ----------
    fs: gphoto2.CameraFilesystem
    folder: str
    context: gphoto2.Context (default=None)


    List all subfolders within a filesystem folder.  

    Parameters
    ----------
    * `fs` :  
        a CameraFilesystem  
    * `folder` :  
        a folder  
    * `list` :  
        a CameraList where subfolders should be listed  
    * `context` :  
        a GPContext  

    Generates a list of subfolders of the supplied folder either using
    cached values (if there are any) or the folder_list_func if it has been
    supplied previously. If not, it is assumed that only a root folder
    exists (which is the case for many cameras).  

    Returns
    -------
    a gphoto2 error code.
    """
    return _filesys.gp_filesystem_list_folders(*args)

def gp_filesystem_get_info(*args) -> "CameraFileInfo *":
    """
    gp_filesystem_get_info(fs, folder, filename, context) -> int

    Parameters
    ----------
    fs: gphoto2.CameraFilesystem
    folder: str
    filename: str
    context: gphoto2.Context (default=None)


    Get information about the specified file.  

    Parameters
    ----------
    * `fs` :  
        a CameraFilesystem  
    * `folder` :  
        the folder that contains the file  
    * `filename` :  
        the filename  
    * `info` :  
        pointer to CameraFileInfo that receives the information  
    * `context` :  
        a GPContext  

    Returns
    -------
    a gphoto2 error code.
    """
    return _filesys.gp_filesystem_get_info(*args)

def gp_filesystem_set_info(*args) -> "int":
    """
    gp_filesystem_set_info(fs, folder, filename, info, context) -> int

    Parameters
    ----------
    fs: gphoto2.CameraFilesystem
    folder: str
    filename: str
    info: gphoto2.CameraFileInfo
    context: gphoto2.Context (default=None)


    Set information about a file.  

    Parameters
    ----------
    * `fs` :  
        a CameraFilesystem  
    * `folder` :  
        foldername where the file resides  
    * `filename` :  
        the files name  
    * `info` :  
        the CameraFileInfo to set  
    * `context` :  
        a GPContext  

    Sets information about a file in the camera.  

    Returns
    -------
    a gphoto2 error code.
    """
    return _filesys.gp_filesystem_set_info(*args)

def gp_filesystem_get_file(*args) -> "int":
    """
    gp_filesystem_get_file(fs, folder, filename, type, file, context) -> int

    Parameters
    ----------
    fs: gphoto2.CameraFilesystem
    folder: str
    filename: str
    type: CameraFileType (gphoto2.GP_FILE_TYPE_PREVIEW etc.)
    file: gphoto2.CameraFile
    context: gphoto2.Context (default=None)


    Get file data from the filesystem.  

    Parameters
    ----------
    * `fs` :  
        a CameraFilesystem  
    * `folder` :  
        the folder in which the file can be found  
    * `filename` :  
        the name of the file to download  
    * `type` :  
        the type of the file  
    * `file` :  
        the file that receives the data  
    * `context` :  
        a GPContext  

    Downloads the file called filename from the folder using the
    get_file_func if such a function has been previously supplied. If the
    file has been previously downloaded, the file is retrieved from cache.
    The result is stored in the passed file structure.  

    Returns
    -------
    a gphoto2 error code.
    """
    return _filesys.gp_filesystem_get_file(*args)

def gp_filesystem_read_file(*args) -> "int":
    """
    gp_filesystem_read_file(fs, folder, filename, type, offset, buf, size, context) -> int

    Parameters
    ----------
    fs: gphoto2.CameraFilesystem
    folder: str
    filename: str
    type: CameraFileType (gphoto2.GP_FILE_TYPE_PREVIEW etc.)
    offset: int
    buf: char *
    size: uint64_t *
    context: gphoto2.Context (default=None)


    Get partial file data from the filesystem.  

    Parameters
    ----------
    * `fs` :  
        a CameraFilesystem  
    * `folder` :  
        the folder in which the file can be found  
    * `filename` :  
        the name of the file to download  
    * `type` :  
        the type of the file  
    * `offset` :  
        the offset where the data starts  
    * `buf` :  
        the targetbuffer where the data will be put  
    * `size` :  
        the size to read and that was read into the buffer  
    * `context` :  
        a GPContext  

    Downloads the file called filename from the folder using the
    read_file_func if such a function has been previously supplied. If the
    file has been previously downloaded, the file is retrieved from cache.  

    The file is read partially into the passed buffer. The read starts at
    offset on the device and goes for at most size bytes. Reading over the
    end of the file might give errors, so get the maximum file size via an
    info function before.  

    Returns
    -------
    a gphoto2 error code.
    """
    return _filesys.gp_filesystem_read_file(*args)

def gp_filesystem_delete_file(*args) -> "int":
    """
    gp_filesystem_delete_file(fs, folder, filename, context) -> int

    Parameters
    ----------
    fs: gphoto2.CameraFilesystem
    folder: str
    filename: str
    context: gphoto2.Context (default=None)


    Delete a file from a folder.  

    Parameters
    ----------
    * `fs` :  
        a CameraFilesystem  
    * `folder` :  
        a folder in which to delete the file  
    * `filename` :  
        the name of the file to delete  
    * `context` :  
        a GPContext  

    If a delete_file_func has been supplied to the fs, this function will be
    called and, if this function returns without error, the file will be
    removed from the fs.  

    Returns
    -------
    a gphoto2 error code.
    """
    return _filesys.gp_filesystem_delete_file(*args)
class _CameraFilesystemFuncs(object):
    """Proxy of C _CameraFilesystemFuncs struct."""

    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    file_list_func = _swig_property(_filesys._CameraFilesystemFuncs_file_list_func_get)
    folder_list_func = _swig_property(_filesys._CameraFilesystemFuncs_folder_list_func_get)
    put_file_func = _swig_property(_filesys._CameraFilesystemFuncs_put_file_func_get)
    delete_all_func = _swig_property(_filesys._CameraFilesystemFuncs_delete_all_func_get)
    get_info_func = _swig_property(_filesys._CameraFilesystemFuncs_get_info_func_get)
    set_info_func = _swig_property(_filesys._CameraFilesystemFuncs_set_info_func_get)
    make_dir_func = _swig_property(_filesys._CameraFilesystemFuncs_make_dir_func_get)
    remove_dir_func = _swig_property(_filesys._CameraFilesystemFuncs_remove_dir_func_get)
    get_file_func = _swig_property(_filesys._CameraFilesystemFuncs_get_file_func_get)
    read_file_func = _swig_property(_filesys._CameraFilesystemFuncs_read_file_func_get)
    del_file_func = _swig_property(_filesys._CameraFilesystemFuncs_del_file_func_get)
    storage_info_func = _swig_property(_filesys._CameraFilesystemFuncs_storage_info_func_get)
    unused = _swig_property(_filesys._CameraFilesystemFuncs_unused_get)
    __swig_destroy__ = _filesys.delete__CameraFilesystemFuncs
_CameraFilesystemFuncs_swigregister = _filesys._CameraFilesystemFuncs_swigregister
_CameraFilesystemFuncs_swigregister(_CameraFilesystemFuncs)


def gp_filesystem_set_funcs(fs: '_CameraFilesystem', funcs: '_CameraFilesystemFuncs', data: 'void *') -> "int":
    """
    gp_filesystem_set_funcs(fs, funcs, data) -> int

    Parameters
    ----------
    fs: gphoto2.CameraFilesystem
    funcs: CameraFilesystemFuncs *
    data: void *


    Set all filesystem related function pointers.  

    Parameters
    ----------
    * `fs` :  
        a CameraFilesystem  
    * `funcs` :  
        pointer to a struct of filesystem functions  
    * `data` :  
        private data  

    Tells the filesystem which functions to call for camera/filesystem
    specific functions, like listing, retrieving, uploading files and so on.  

    Returns
    -------
    a gphoto2 error code.
    """
    return _filesys.gp_filesystem_set_funcs(fs, funcs, data)

def gp_filesystem_put_file(*args) -> "int":
    """
    gp_filesystem_put_file(fs, folder, filename, type, file, context) -> int

    Parameters
    ----------
    fs: gphoto2.CameraFilesystem
    folder: str
    filename: str
    type: CameraFileType (gphoto2.GP_FILE_TYPE_PREVIEW etc.)
    file: gphoto2.CameraFile
    context: gphoto2.Context (default=None)


    Upload a file to a folder on the device filesystem.  

    Parameters
    ----------
    * `fs` :  
        a CameraFilesystem  
    * `folder` :  
        the folder where to put the file into  
    * `file` :  
        the file  
    * `context` :  
        a GPContext  

    Uploads a file to the camera if a put_file_func has been previously
    supplied to the fs. If the upload is successful, the file will get
    cached in the fs.  

    Returns
    -------
    a gphoto2 error code.
    """
    return _filesys.gp_filesystem_put_file(*args)

def gp_filesystem_delete_all(*args) -> "int":
    """
    gp_filesystem_delete_all(fs, folder, context) -> int

    Parameters
    ----------
    fs: gphoto2.CameraFilesystem
    folder: str
    context: gphoto2.Context (default=None)


    Delete all files in specified folder.  

    Parameters
    ----------
    * `fs` :  
        a CameraFilesystem  
    * `folder` :  
        the folder in which to delete all files  
    * `context` :  
        a GPContext  

    Deletes all files in the given folder from the fs. If the fs has not
    been supplied with a delete_all_func, it tries to delete the files one
    by one using the delete_file_func. If that function has not been
    supplied neither, an error is returned.  

    Returns
    -------
    a gphoto2 error code.
    """
    return _filesys.gp_filesystem_delete_all(*args)

def gp_filesystem_make_dir(*args) -> "int":
    """
    gp_filesystem_make_dir(fs, folder, name, context) -> int

    Parameters
    ----------
    fs: gphoto2.CameraFilesystem
    folder: str
    name: str
    context: gphoto2.Context (default=None)


    Create a subfolder within a folder.  

    Parameters
    ----------
    * `fs` :  
        a CameraFilesystem  
    * `folder` :  
        the folder in which the directory should be created  
    * `name` :  
        the name of the directory to be created  
    * `context` :  
        a GPContext  

    Creates a new directory called name in given folder.  

    Returns
    -------
    a gphoto2 error code
    """
    return _filesys.gp_filesystem_make_dir(*args)

def gp_filesystem_remove_dir(*args) -> "int":
    """
    gp_filesystem_remove_dir(fs, folder, name, context) -> int

    Parameters
    ----------
    fs: gphoto2.CameraFilesystem
    folder: str
    name: str
    context: gphoto2.Context (default=None)


    Remove a subfolder from within a folder.  

    Parameters
    ----------
    * `fs` :  
        a CameraFilesystem  
    * `folder` :  
        the folder in which the directory should be created  
    * `name` :  
        the name of the directory to be created  
    * `context` :  
        a GPContext  

    Removes a directory called name from the given folder.  

    Returns
    -------
    a gphoto2 error code
    """
    return _filesys.gp_filesystem_remove_dir(*args)

def gp_filesystem_dump(fs: '_CameraFilesystem') -> "int":
    """
    gp_filesystem_dump(fs) -> int

    Parameters
    ----------
    fs: gphoto2.CameraFilesystem


    Dump the current filesystem.  

    Parameters
    ----------
    * `fs` :  
        the CameraFilesystem  

    Returns
    -------
    a gphoto error code  

    Internal function to dump the current filesystem.
    """
    return _filesys.gp_filesystem_dump(fs)


