Class: GPhoto2::FileCameraFileInfo
- Inherits:
-
CameraFileInfo
- Object
- CameraFileInfo
- GPhoto2::FileCameraFileInfo
- Defined in:
- lib/gphoto2/camera_file_info/file_camera_file_info.rb
Constant Summary
Constants included from FFI::GPhoto2
FFI::GPhoto2::CameraCaptureType, FFI::GPhoto2::CameraDriverStatus, FFI::GPhoto2::CameraEventType, FFI::GPhoto2::CameraFileAccessType, FFI::GPhoto2::CameraFileInfoFields, FFI::GPhoto2::CameraFileOperation, FFI::GPhoto2::CameraFilePermissions, FFI::GPhoto2::CameraFileStatus, FFI::GPhoto2::CameraFileType, FFI::GPhoto2::CameraFolderOperation, FFI::GPhoto2::CameraOperation, FFI::GPhoto2::CameraWidgetType, FFI::GPhoto2::GphotoDeviceType
Instance Attribute Summary
Attributes included from Struct
Instance Method Summary collapse
- #deletable? ⇒ Boolean?
- #height ⇒ Integer?
-
#mtime ⇒ Time?
The last modification time.
- #readable? ⇒ Boolean?
- #width ⇒ Integer?
Methods inherited from CameraFileInfo
#fields, #has_field?, #initialize, #size, #status, #type
Methods included from Struct
Constructor Details
This class inherits a constructor from GPhoto2::CameraFileInfo
Instance Method Details
#deletable? ⇒ Boolean?
20 21 22 23 |
# File 'lib/gphoto2/camera_file_info/file_camera_file_info.rb', line 20 def deletable? = fetch(:permissions) ( & CameraFilePermissions[:delete]) != 0 if end |
#height ⇒ Integer?
9 10 11 |
# File 'lib/gphoto2/camera_file_info/file_camera_file_info.rb', line 9 def height fetch(:height) end |
#mtime ⇒ Time?
Returns the last modification time.
26 27 28 |
# File 'lib/gphoto2/camera_file_info/file_camera_file_info.rb', line 26 def mtime Time.at(ptr[:mtime]) if has_field?(:mtime) end |
#readable? ⇒ Boolean?
14 15 16 17 |
# File 'lib/gphoto2/camera_file_info/file_camera_file_info.rb', line 14 def readable? = fetch(:permissions) ( & CameraFilePermissions[:read]) != 0 if end |
#width ⇒ Integer?
4 5 6 |
# File 'lib/gphoto2/camera_file_info/file_camera_file_info.rb', line 4 def width fetch(:width) end |