Directory

Get-NetstorageDirectory

Synopsis

Get a directory.

Syntax

Get-NetstorageDirectory [-Path] <String> [-Prefix <String>] [-StartPath <String>] [-EndPath <String>] [-MaxEntries <Int32>] [-Encoding <String>] [-SlashBoth] [-AuthFile <String>] [-Section <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Get-NetstorageDirectory [-Path] <String> [-Recurse] [-EndPath <String>] [-MaxEntries <Int32>] [-Encoding <String>] [-SlashBoth] [-AuthFile <String>] [-Section <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

Description

Gets a NetStorage directory, either with an optional -Prefix (dir) or recursively with -Recurse (list).

Note: You don't need to prepend paths with the upload directory CP code, this is implied.

Parameters

‑AuthFile

A location of your NetStorage auth file. Defaults to ~/.nsrc, but environment variables will take precedence.

‑Encoding

A specific encoding to use when requesting a response, for example, utf-8.

‑EndPath

A complete path to the last object to return in the list response. All other objects that exist after the noted path are left out of the response.

The zero 0 character exists in place of the trailing slash to accommodate NetStorage directory logic. As a result, the list will display everything up to, and including the last object in the path and possibly a path named [path]0 if one exists.

‑MaxEntries

A limit on the number of entries returned.

‑Path
Required

A path of your directory within the NetStorage group.

‑Prefix

Lists files whose names begin with the specified prefix.

‑Recurse

Uses the list action instead of dir and recurses into child directories.

‑Section

The section name in your EdgeGrid resource file to retrieve authentication credentials from. Defaults to default.

‑SlashBoth

Sets an additional slash option to both.

‑StartPath

The first file in the directory whose name is greater than or equal to this value. This value is appended to the prefix if that field is also included.

Related Links