Share via


AdlsClient.GetFileProperties 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
String

Path of the file or directory

getAclUsage
Boolean

True if we want Acl usage

dumpFileName
String

Filename containing the ACL or Disk usage dump

getDiskUsage
Boolean

True if we want disk usage

saveToLocal
Boolean

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

numThreads
Int32

Number of threads

displayFiles
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
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
Int64

Maximum depth till which we want to view the properties

cancelToken
CancellationToken

CancellationToken to cancel the recursive process

Applies to