

def _split_path(self, path):
    "\n        Hack to try to support both types of file system paths:\n          - forward slash, /etc\n          - backslash, C:\\windows\\system32\n\n        Linux uses forward slashes, so we'd like that when working with FUSE.\n        The original file system used backslashes, so we'd also like that.\n\n        This is a poor attempt at doing both:\n          - detect which slash type is in use\n          - don't support both at the same time\n\n        This works like string.partition(PATH_SEPARATOR)\n        "
    if ('\\' in path):
        if ('/' in path):
            raise UnsupportedPathError(path)
        return path.partition('\\')
    elif ('/' in path):
        if ('\\' in path):
            raise UnsupportedPathError(path)
        return path.partition('/')
    else:
        return (path, '', '')

dataset/ETHPy150Open williballenthin/python-ntfs/ntfs/filesystem/__init__.py NTFSDirectory._split_path/original