Python os.pathconf() Examples
The following are 7
code examples of os.pathconf().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
os
, or try the search function
.
Example #1
Source File: __init__.py From OpenMTC with Eclipse Public License 1.0 | 5 votes |
def pathconf(self, name): return os.pathconf(self, name) # --- Modifying operations on files and directories
Example #2
Source File: _path.py From Computable with MIT License | 5 votes |
def pathconf(self, name): return os.pathconf(self, name) # --- Modifying operations on files and directories
Example #3
Source File: test_os.py From Fluid-Designer with GNU General Public License v3.0 | 5 votes |
def test_fpathconf(self): self.check(os.pathconf, "PC_NAME_MAX") self.check(os.fpathconf, "PC_NAME_MAX")
Example #4
Source File: test_os.py From ironpython3 with Apache License 2.0 | 5 votes |
def test_fpathconf(self): self.check(os.pathconf, "PC_NAME_MAX") self.check(os.fpathconf, "PC_NAME_MAX")
Example #5
Source File: path.py From click-configfile with BSD 3-Clause "New" or "Revised" License | 5 votes |
def pathconf(self, name): """ .. seealso:: :func:`os.pathconf` """ return os.pathconf(self, name) # # --- Modifying operations on files and directories
Example #6
Source File: test_os.py From Project-New-Reign---Nemesis-Main with GNU General Public License v3.0 | 5 votes |
def test_fpathconf(self): self.check(os.pathconf, "PC_NAME_MAX") self.check(os.fpathconf, "PC_NAME_MAX")
Example #7
Source File: tests.py From djongo with GNU Affero General Public License v3.0 | 5 votes |
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