class

YandexDisk::Config

Inherits YAML::Serializable < Reference < Object

The whole sync job, as loaded from YAML.

Constructors

from_file(path : Path | String) : Config
Source
new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
Source

Instance methods

chunk_size

Files larger than this are uploaded in resumable chunks of this size.

Source
chunk_size=(chunk_size : String)

Files larger than this are uploaded in resumable chunks of this size.

Source
chunk_size_bytes
Source
concurrency

How many files to upload at once.

Source
concurrency=(concurrency : Int32)

How many files to upload at once.

Source
normalized_remote_root
Source
overwrite

Replace an existing remote file instead of failing on conflict.

Source
overwrite=(overwrite : Bool)

Replace an existing remote file instead of failing on conflict.

Source
remote_root

Remote directory every source is placed under.

Source
remote_root=(remote_root : String)

Remote directory every source is placed under.

Source
resolve_token

Resolves the OAuth token from the config file, a token file, or the environment — in that order.

Source
retention

Default retention, applied to every source that does not override it.

Source
retention=(retention : RetentionConfig | Nil)

Default retention, applied to every source that does not override it.

Source
retention_for(source : Source) : RetentionConfig | Nil

Retention that applies to source, falling back to the global policy.

Source
retry
Source
retry=(retry : RetryConfig)
Source
skip_unchanged

Skip a file when the remote copy already has the same size and MD5.

Source
skip_unchanged=(skip_unchanged : Bool)

Skip a file when the remote copy already has the same size and MD5.

Source
sources
Source
sources=(sources : Array(Source))
Source
token

OAuth token. Prefer token_file or the environment over inlining it.

Source
token=(token : String | Nil)

OAuth token. Prefer token_file or the environment over inlining it.

Source
token_env

Environment variable to read the OAuth token from.

Source
token_env=(token_env : String)

Environment variable to read the OAuth token from.

Source
token_file

File to read the OAuth token from, e.g. /etc/yandex-disk/token.

Source
token_file=(token_file : String | Nil)

File to read the OAuth token from, e.g. /etc/yandex-disk/token.

Source
validate!
Source
verify_checksum

Compare MD5 as well as size. Turning this off skips hashing large files but will also skip re-uploading a file that changed in place without changing size.

Source
verify_checksum=(verify_checksum : Bool)

Compare MD5 as well as size. Turning this off skips hashing large files but will also skip re-uploading a file that changed in place without changing size.

Source