struct

YandexDisk::Resource

Inherits JSON::Serializable < Struct < Value < Object

A file or directory, as returned by the metadata endpoints.

Constructors

new(name : String, path : String, type : String, size : Int64 | Nil = nil, md5 : String | Nil = nil, sha256 : String | Nil = nil, mime_type : String | Nil = nil, media_type : String | Nil = nil, created : Time | Nil = nil, modified : Time | Nil = nil, public_key : String | Nil = nil, public_url : String | Nil = nil, custom_properties : Hash(String, JSON::Any) | Nil = nil, preview : String | Nil = nil, revision : Int64 | Nil = nil, origin_path : String | Nil = nil, embedded : ResourceList | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

created
Source
custom_properties

Set by Client#set_custom_properties; capped by the API at 1 KB total.

Source
dir?
Source
embedded
Source
file?
Source
items

The entries inside this directory, or an empty array for a file.

Source
media_type

"image", "video", "document"… — the same vocabulary the media_type filter on Client#files accepts.

Source
mime_type
Source
modified
Source
name
Source
normalized_path
Source
origin_path

Where the resource lived before it was deleted. Trash listings only.

Source
path
Source
preview
Source
public_key

Present only while the resource is published.

Source
public_url
Source
published?
Source
revision
Source
sha256
Source
size
Source
type

Either "file" or "dir".

Source