def asBytesMode(self, encoding=None):
        """
        Return this L{FilePath} in L{bytes}-mode.

        @param encoding: The encoding to use if coercing to L{bytes}. If none is
            given, L{sys.getfilesystemencoding} is used.

        @return: L{bytes} mode L{FilePath}
        """
        if type(self.path) == unicode:
            return self.clonePath(self._asBytesPath(encoding=encoding))
        return self

        Return this L{FilePath} in L{bytes}-mode.

        @param encoding: The encoding to use if coercing to L{bytes}. If none is
            given, L{sys.getfilesystemencoding} is used.

        @return: L{bytes} mode L{FilePath}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/filepath.py