Module: GPhoto2::Camera::Filesystem

Included in:
GPhoto2::Camera
Defined in:
lib/gphoto2/camera/filesystem.rb

Instance Method Summary collapse

Instance Method Details

#delete(file) ⇒ void

This method returns an undefined value.

Parameters:



26
27
28
# File 'lib/gphoto2/camera/filesystem.rb', line 26

def delete(file)
  file_delete(file)
end

#file(file) ⇒ CameraFile

Parameters:

Returns:



20
21
22
# File 'lib/gphoto2/camera/filesystem.rb', line 20

def file(file)
  file_get(file)
end

#filesystem(root = '/') ⇒ CameraFolder Also known as: /

Examples:

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

Parameters:

  • root (String) (defaults to: '/')

Returns:



12
13
14
15
# File 'lib/gphoto2/camera/filesystem.rb', line 12

def filesystem(root = '/')
  root = "/#{root}" if root[0] != '/'
  CameraFolder.new(self, root)
end