NetStorage (netstorage v0.2.2)
Akamai NetStorage Usage API wrapper.
Defaults to version 1. To change the version number, pass
[version: <version_number>]
to the action_opts
.
Link to this section Summary
Functions
Delete content
List objects directly within the path.
Disk usage information for a specified path.
Download a specified object.
List the objects directly within the specified path.
Create a new directory.
Rename a specified object.
Performs NetStorage request.
Delete an empty directory.
Delete of a selected directory, including all contents.
Information about a named file, symlink, or directory.
Create a symbolic link.
Change a the modification time ("touch") of an object.
Upload content to specified path.
Link to this section Types
action()
action_opts()
@type action_opts() :: keyword()
path()
@type path() :: binary()
request_opts()
@type request_opts() :: keyword()
Link to this section Functions
delete(path, opts \\ [])
@spec delete(path :: path(), opts :: action_opts()) :: any()
Delete content
https://techdocs.akamai.com/netstorage-usage/reference/put-delete
dir(path, opts \\ [])
@spec dir(path :: path(), opts :: action_opts()) :: any()
List objects directly within the path.
https://techdocs.akamai.com/netstorage-usage/reference/get-dir
disk_usage(path, opts \\ [])
@spec disk_usage(path :: path(), opts :: action_opts()) :: any()
Disk usage information for a specified path.
https://techdocs.akamai.com/netstorage-usage/reference/get-du
download(path, opts \\ [])
@spec download(path :: path(), opts :: action_opts()) :: any()
Download a specified object.
https://techdocs.akamai.com/netstorage-usage/reference/get-download
list(path, opts \\ [])
@spec list(path :: path(), opts :: action_opts()) :: any()
List the objects directly within the specified path.
https://techdocs.akamai.com/netstorage-usage/reference/get-list
mkdir(path, opts \\ [])
@spec mkdir(path :: path(), opts :: action_opts()) :: any()
Create a new directory.
https://techdocs.akamai.com/netstorage-usage/reference/put-mkdir
rename(source, destination, opts \\ [])
@spec rename(source :: path(), destination :: path(), opts :: action_opts()) :: any()
Rename a specified object.
The destination
path must include the Content Provier Code
.
iex> NetStorage.rename("/path/to/file", "/<cp-code>/path/to/file")
https://techdocs.akamai.com/netstorage-usage/reference/put-rename
request(op, opts \\ [])
@spec request(operation :: NetStorage.Operation.t(), opts :: request_opts()) :: :ok | {:ok, term()} | :error | {:error, term()}
Performs NetStorage request.
rmdir(path, opts \\ [])
@spec rmdir(path :: path(), opts :: action_opts()) :: any()
Delete an empty directory.
https://techdocs.akamai.com/netstorage-usage/reference/put-rmdir
rmrf(path, opts \\ [])
@spec rmrf(path :: path(), opts :: action_opts()) :: any()
Delete of a selected directory, including all contents.
Must pass [confirm: :imreallyreallysure]
ops, otherwise this
function will noop
.
https://techdocs.akamai.com/netstorage-usage/reference/post-quick-delete
stat(path, opts \\ [])
@spec stat(path :: path(), opts :: action_opts()) :: any()
Information about a named file, symlink, or directory.
https://techdocs.akamai.com/netstorage-usage/reference/get-stat
symlink(path, target, opts \\ [])
@spec symlink(path :: path(), target :: path(), opts :: action_opts()) :: any()
Create a symbolic link.
https://techdocs.akamai.com/netstorage-usage/reference/post-symlink
touch(path, timestamp, opts \\ [])
Change a the modification time ("touch") of an object.
https://techdocs.akamai.com/netstorage-usage/reference/post-mtime
upload(path, blob, opts \\ [])
@spec upload(path :: path(), blob :: binary(), opts :: action_opts()) :: any()
Upload content to specified path.
https://techdocs.akamai.com/netstorage-usage/reference/put-upload