AdlsClient.GetFileProperties(String, Boolean, String, Boolean, Boolean, Int32, Boolean, Boolean, Int64, CancellationToken) Method

Definition

Recursively dumps file property of alldirectories or/and files under the given path to a local or adl file. File property can be disk usage or Acl or both. It is highly recomended to set ServicePointManager.DefaultConnectionLimit to the number of threads application wants the sdk to use before creating any instance of AdlsClient. By default ServicePointManager.DefaultConnectionLimit is set to 2.

public virtual void GetFileProperties (string path, bool getAclUsage, string dumpFileName, bool getDiskUsage = true, bool saveToLocal = true, int numThreads = -1, bool displayFiles = false, bool hideConsistentAcl = false, long maxDepth = 9223372036854775807, System.Threading.CancellationToken cancelToken = default);
abstract member GetFileProperties : string * bool * string * bool * bool * int * bool * bool * int64 * System.Threading.CancellationToken -> unit
override this.GetFileProperties : string * bool * string * bool * bool * int * bool * bool * int64 * System.Threading.CancellationToken -> unit
Public Overridable Sub GetFileProperties (path As String, getAclUsage As Boolean, dumpFileName As String, Optional getDiskUsage As Boolean = true, Optional saveToLocal As Boolean = true, Optional numThreads As Integer = -1, Optional displayFiles As Boolean = false, Optional hideConsistentAcl As Boolean = false, Optional maxDepth As Long = 9223372036854775807, Optional cancelToken As CancellationToken = Nothing)

Parameters

path
System.String

Path of the file or directory

getAclUsage
System.Boolean

True if we want Acl usage

dumpFileName
System.String

Filename containing the ACL or Disk usage dump

getDiskUsage
System.Boolean

True if we want disk usage

saveToLocal
System.Boolean

True if we want to save to local file else save to ADL

numThreads
System.Int32

Number of threads

displayFiles
System.Boolean

True if we want to display properties of files. By default we show properties of directories. If this is false we would not retrieve Acls for files.

hideConsistentAcl
System.Boolean

Do not show directory subtree if the ACLs are the same throughout the entire subtree. This makes it easier to see only the paths up to which the ACLs differ. For example if all files and folders under /a/b are the same, do not show the subtree under /a/b, and just output /a/b with 'True' in the Consistent ACL column. Cannot be set if IncludeFiles is not set, because consistent Acl cannot be determined without retrieving acls for the files.

maxDepth
System.Int64

Maximum depth till which we want to view the properties

cancelToken
System.Threading.CancellationToken

CancellationToken to cancel the recursive process

Applies to