YandexDisk::RemotePath
Helpers for the namespaced paths the REST API speaks.
The API accepts both /photo.png and disk:/photo.png, but it always
answers with the prefixed form. Normalising on the way in keeps
comparisons between what you asked for and what came back honest.
Trash lives in its own namespace: a file at disk:/a/b.txt becomes
trash:/b.txt once deleted, so the two prefixes must not be mixed up.
Constants
Class methods
Every ancestor of path from the shallowest down, excluding the root.
ancestors("disk:/a/b/c") => ["disk:/a", "disk:/a/b", "disk:/a/b/c"]
Returns the parent of path, or nil when path is the root.
Returns path under prefix, collapsing repeated and trailing slashes.
An existing namespace prefix is replaced, so normalize("trash:/a")
yields disk:/a unless you ask for the trash namespace explicitly.