module GPhoto2::Camera::Filesystem

Public Instance Methods

/(root = '/')
Alias for: filesystem
delete(file) click to toggle source

@param [CameraFile] file @return [void]

# File lib/gphoto2/camera/filesystem.rb, line 26
def delete(file)
  file_delete(file)
end
file(file) click to toggle source

@param [CameraFile] file @return [CameraFile]

# File lib/gphoto2/camera/filesystem.rb, line 20
def file(file)
  file_get(file)
end
filesystem(root = '/') click to toggle source

@example

# Get a list of filenames in a path.
folder = camera/'store_00010001/DCIM/100D5100'
folder.files.map(&:name)
# => ["DSC_0001.JPG", "DSC_0002.JPG", ...]

@param [String] root @return [CameraFolder]

# File lib/gphoto2/camera/filesystem.rb, line 12
def filesystem(root = '/')
  root = "/#{root}" if root[0] != '/'
  CameraFolder.new(self, root)
end
Also aliased as: /

Private Instance Methods

file_delete(file) click to toggle source
# File lib/gphoto2/camera/filesystem.rb, line 38
def file_delete(file)
  rc = gp_camera_file_delete(ptr, file.folder, file.name, context.ptr)
  GPhoto2.check!(rc)
end
file_get(file, type = :normal) click to toggle source
# File lib/gphoto2/camera/filesystem.rb, line 32
def file_get(file, type = :normal)
  rc = gp_camera_file_get(ptr, file.folder, file.name, type, file.ptr, context.ptr)
  GPhoto2.check!(rc)
  file
end