Beispiel #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
Beispiel #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
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
Beispiel #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