本文整理匯總了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