你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

AzureDLPath Class

Subclass of native object-oriented filesystem path.

This is used as a convenience class for reducing boilerplate and eliminating differences between system-dependent paths.

We subclass the system's concrete pathlib class due to this issue:

http://stackoverflow.com/questions/29850801/subclass-pathlib-path-fails

Construct a PurePath from one or several strings and or existing PurePath objects. The strings and path objects are combined so as to yield a canonicalized path, which is incorporated into the new PurePath object.

Inheritance
AzureDLPath

Constructor

AzureDLPath(*args)

Parameters

Name Description
path
Required
AzureDLPath or <xref:azure.datalake.store.core.string>

location of file or directory

Examples


>>> p1 = AzureDLPath('/Users/foo')  
>>> p2 = AzureDLPath(p1.name)  

Methods

startswith

Return whether string starts with the prefix.

This is equivalent to str.startswith.

trim

Return path without anchor (concatenation of drive and root).

startswith

Return whether string starts with the prefix.

This is equivalent to str.startswith.

startswith(prefix, *args, **kwargs)

Parameters

Name Description
prefix
Required

trim

Return path without anchor (concatenation of drive and root).

trim()

Attributes

globless_prefix

Return shortest path prefix without glob quantifiers.