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.

Official Akamai Documentation

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

@type action() :: binary() | atom()
Link to this type

action_opts()

@type action_opts() :: keyword()
@type path() :: binary()
Link to this type

request_opts()

@type request_opts() :: keyword()

Link to this section Functions

Link to this function

delete(path, opts \\ [])

@spec delete(path :: path(), opts :: action_opts()) :: any()

Delete content

https://techdocs.akamai.com/netstorage-usage/reference/put-delete

Link to this function

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

Link to this function

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

Link to this function

download(path, opts \\ [])

@spec download(path :: path(), opts :: action_opts()) :: any()

Download a specified object.

https://techdocs.akamai.com/netstorage-usage/reference/get-download

Link to this function

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

Link to this function

mkdir(path, opts \\ [])

@spec mkdir(path :: path(), opts :: action_opts()) :: any()

Create a new directory.

https://techdocs.akamai.com/netstorage-usage/reference/put-mkdir

Link to this function

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

Link to this function

request(op, opts \\ [])

@spec request(operation :: NetStorage.Operation.t(), opts :: request_opts()) ::
  :ok | {:ok, term()} | :error | {:error, term()}

Performs NetStorage request.

Link to this function

rmdir(path, opts \\ [])

@spec rmdir(path :: path(), opts :: action_opts()) :: any()

Delete an empty directory.

https://techdocs.akamai.com/netstorage-usage/reference/put-rmdir

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

touch(path, timestamp, opts \\ [])

Change a the modification time ("touch") of an object.

https://techdocs.akamai.com/netstorage-usage/reference/post-mtime

Link to this function

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