MCPcopy Create free account
hub / github.com/twisted/twisted / _asTextPath

Method _asTextPath

src/twisted/python/filepath.py:867–876  ·  view source on GitHub ↗

Return the path of this L{FilePath} as text. @param encoding: The encoding to use if coercing to L{unicode}. If none is given, L{sys.getfilesystemencoding} is used. @return: L{unicode}

(self, encoding: str | None = None)

Source from the content-addressed store, hash-verified

865 return _asFilesystemBytes(self.path, encoding=encoding)
866
867 def _asTextPath(self, encoding: str | None = None) -> str:
868 """
869 Return the path of this L{FilePath} as text.
870
871 @param encoding: The encoding to use if coercing to L{unicode}. If none
872 is given, L{sys.getfilesystemencoding} is used.
873
874 @return: L{unicode}
875 """
876 return _asFilesystemText(self.path, encoding=encoding)
877
878 def asBytesMode(self, encoding: str | None = None) -> FilePath[bytes]:
879 """

Calls 1

_asFilesystemTextFunction · 0.85