On Thu, Apr 5, 2012 at 1:15 AM, Steve Howell <showel...@yahoo.com> wrote: > On Apr 4, 1:37 am, Chris Angelico <ros...@gmail.com> wrote: >> And, as a subtle point: This method can't create the file "at size". I >> don't know how it'll end up allocating space, but certainly there's no >> opportunity to announce to the OS at file open/create time "please >> allocate X bytes for this file". That may be an utterly trivial point, >> or a crucially vital one. >> >> ChrisA > > FWIW shutil.py doesn't do anything particularly fancy with respect to > creating files "at size", unless I'm missing something:
So it doesn't. However, that's current implementation, and it's entirely possible that a future version might add that feature - it wouldn't break any existing code, and would improve file system performance. Doing it yourself means you miss out on any such enhancements. ChrisA -- http://mail.python.org/mailman/listinfo/python-list