class

GPhoto2::CameraFile

Inherits GPhoto2::Struct / Reference / Object

Constants

BUFFER_SIZE = 256 * 1024

Initial buffer size used in #read.

PREVIEW_FILENAME = "capture_preview.jpg"

The preview data is assumed to be a jpg.

UNKNOWN_MIME_TYPE = "unknown/unknown"

The unknown mime type as specified by the libgphoto2.

Constructors

new(camera : GPhoto2::Camera, path : Path | String)

NOTE: allocates memory.

Source
new(camera : GPhoto2::Camera)

NOTE: allocates memory.

Source

Instance methods

==(other : self)

Returns true if this reference is the same as other. Invokes same?.

Source
close

NOTE: frees allocated memory.

Source
data

Returns pointer file data.

Source
delete

Deletes file from the camera.

Source
finalize

Finalizes object by freeing allocated memory.

Source
folder
Source
info

Returns an object containing information about the file.

Source
name
Source
path

Returns file path.

Source
preview?

Returns true if file is a preview.

Source
read

Reads file directly from the camera.

Source
save(path : Path | String = default_filename) : Nil

Saves file #data at given pathname.

Source
size

Returns file size (in bytes).

Source
to_s

Returns file #path.

Source
to_slice

Returns file #data as Bytes.

Source

Nested types