class GPhoto2::CameraFolder

Included Modules

Defined in:

gphoto2/camera_folder.cr
gphoto2/camera_folder/compression.cr

Constructors

Instance Method Summary

Instance methods inherited from module GPhoto2::CameraFolder::Compression

to_zip_file(io : IO, root : String | Nil = nil) : Nil
to_zip_file(root : String | Nil = nil) : File
to_zip_file(root : String | Nil = nil, &) : Nil
to_zip_file

Constructor Detail

def self.new(camera : GPhoto2::Camera, path : Path | String = "/") #

[View source]

Instance Method Detail

def /(name : String) : CameraFolder #

See: #cd


[View source]
def ==(other : self) #
Description copied from class Reference

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


[View source]
def cd(name : String) : CameraFolder #

Returns subfolder by name, relative to current #path.


[View source]
def clear(files : Bool = true, folders : Bool = false) : Nil #

Deletes all files and/or sub-folders.


[View source]
def delete : Nil #

Deletes this folder (along with all files and subfolders) from the camera.


[View source]
def files : Array(CameraFile) #

Lists files.


[View source]
def folders : Array(CameraFolder) #

Lists sub-folders.


[View source]
def mkdir(name : String) : CameraFolder #

Creates a new folder and returns it


[View source]
def name : String #

Returns folder name.


[View source]
def open(name : String) : CameraFile #

Returns file by name, relative to current #path.


[View source]
def parent : CameraFolder #

Returns parent folder or self.


[View source]
def parent? : CameraFolder | Nil #

Returns parent folder or nil.


[View source]
def path : Path #

Returns folder path.


[View source]
def put(name : String, data : Bytes, type : CameraFile::Type = :normal, *, mime_type : String | Nil = nil, mtime : Time | Nil = nil) : CameraFile #

Uploads a new file and returns it


[View source]
def root? #

Returns true if folder #path is #/.


[View source]
def to_s #

Returns folder #path as string.


[View source]