Return this L{FilePath} in L{unicode}-mode. @param encoding: The encoding to use if coercing to L{unicode}. If none is given, L{sys.getfilesystemencoding} is used. @return: L{unicode} mode L{FilePath}
(self, encoding: str | None = None)
| 889 | return self |
| 890 | |
| 891 | def asTextMode(self, encoding: str | None = None) -> FilePath[str]: |
| 892 | """ |
| 893 | Return this L{FilePath} in L{unicode}-mode. |
| 894 | |
| 895 | @param encoding: The encoding to use if coercing to L{unicode}. If none |
| 896 | is given, L{sys.getfilesystemencoding} is used. |
| 897 | |
| 898 | @return: L{unicode} mode L{FilePath} |
| 899 | """ |
| 900 | if isinstance(self.path, bytes): |
| 901 | return self.clonePath(self._asTextPath(encoding=encoding)) |
| 902 | return self |
| 903 | |
| 904 | def _getPathAsSameTypeAs(self, pattern: OtherAnyStr) -> OtherAnyStr: |
| 905 | """ |