What sucks at the current stdlib filesystem api?

This is some collection of what we do not like (and want to fix).

PathNames

  • dealing with os.sep, os.path.join not easy enough, too much to type
  • a pathname at the upper interface should be unicode (== ucs4, not utf-8, not utf-16), so that the programmer of platform independant software does not have to deal with different filesystem encodings (e.g utf-8 on linux, utf-16(2) on win32/ntfs, ...)
    • for filesystem that can't map unicode to their filename encoding for any input, we maybe need to offer some capability querying method.

Path/File name operations

  • os.rename - replace with something having an atomic_required flag and emulate with del/ren on win32 if not atomic_required
  • realPathCase -- currently platform dependant application code needed (implement it in the lib)
  • touch -- currently platform dependant application code needed (implement it in the lib)
  • chown/chmod (do nothing on platform not supporting it)

highlevel stuff

  • shutil.copystat needs fixing
  • shutil.copytree also
  • copyfileobj with iterators