Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dsainati1 committed Nov 17, 2021
1 parent d22e103 commit 2ee3fb9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/language/accounts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,20 @@ to all its stored objects.

The path must be a storage path, i.e., only the domain `storage` is allowed.

- `cadence•fun clear(_ path: StoragePath): Bool`

Clears an object from the account's storage which is stored under the given path

If there is an object stored, the stored resource or structure is removed from storage, and
destroyed if it is a resource.

When the function returns, the storage no longer contains an object under the given path.

The path must be a storage path, i.e., only the domain ` + "`storage`" + ` is allowed.

The function returns true if a stored object was cleared, and false if no object
was stored under the given path.

- `cadence•fun copy<T: AnyStruct>(from: StoragePath): T?`

Returns a copy of a structure stored in account storage, without removing it from storage.
Expand Down

0 comments on commit 2ee3fb9

Please sign in to comment.