Exemplo n.º 1
0
 def _write_file(longname, contents):
     self.write_file(longname, contents)
     import win32api
     shortname = extended_path_undo(
         win32api.GetShortPathName(extended_path(longname)))
     self.assertExists(shortname)
     return shortname
Exemplo n.º 2
0
def volume_from_file(file_name):
    # strip \\?\
    split_path = os.path.splitdrive(extended_path_undo(file_name))
    volume = split_path[0]
    if volume and volume[-1] != os.sep:
        volume += os.sep
    return volume
Exemplo n.º 3
0
def volume_from_file(file_name):
    # strip \\?\
    split_path = os.path.splitdrive(extended_path_undo(file_name))
    volume = split_path[0]
    if volume and volume[-1] != os.sep:
        volume += os.sep
    return volume
Exemplo n.º 4
0
 def _write_file(longname, contents):
     self.write_file(longname, contents)
     import win32api
     shortname = extended_path_undo(
         win32api.GetShortPathName(extended_path(longname)))
     self.assertExists(shortname)
     return shortname