本文整理汇总了Python中os.pathconf方法的典型用法代码示例。如果您正苦于以下问题:Python os.pathconf方法的具体用法?Python os.pathconf怎么用?Python os.pathconf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类os
的用法示例。
在下文中一共展示了os.pathconf方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: pathconf
# 需要导入模块: import os [as 别名]
# 或者: from os import pathconf [as 别名]
def pathconf(self, name):
return os.pathconf(self, name)
# --- Modifying operations on files and directories
示例2: pathconf
# 需要导入模块: import os [as 别名]
# 或者: from os import pathconf [as 别名]
def pathconf(self, name):
return os.pathconf(self, name)
# --- Modifying operations on files and directories
示例3: test_fpathconf
# 需要导入模块: import os [as 别名]
# 或者: from os import pathconf [as 别名]
def test_fpathconf(self):
self.check(os.pathconf, "PC_NAME_MAX")
self.check(os.fpathconf, "PC_NAME_MAX")
示例4: pathconf
# 需要导入模块: import os [as 别名]
# 或者: from os import pathconf [as 别名]
def pathconf(self, name):
""" .. seealso:: :func:`os.pathconf` """
return os.pathconf(self, name)
#
# --- Modifying operations on files and directories
示例5: _storage_max_filename_length
# 需要导入模块: import os [as 别名]
# 或者: from os import pathconf [as 别名]
def _storage_max_filename_length(self, storage):
"""
Query filesystem for maximum filename length (e.g. AUFS has 242).
"""
dir_to_test = storage.location
while not os.path.exists(dir_to_test):
dir_to_test = os.path.dirname(dir_to_test)
try:
return os.pathconf(dir_to_test, 'PC_NAME_MAX')
except Exception:
return 255 # Should be safe on most backends