[issue41092] Report actual size from 'os.path.getsize'

2020-06-26 Thread Gareth Rees
Gareth Rees added the comment: The proposed change adds a Boolean flag to os.path.getsize() so that it returns: os.stat(filename).st_blocks * 512 (where the 512 is the file system block size on Linux; some work is needed to make this portable to other operating systems). The Boolean arg

[issue41092] Report actual size from 'os.path.getsize'

2020-06-23 Thread Stephen Finucane
Change by Stephen Finucane : -- keywords: +patch pull_requests: +20254 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21088 ___ Python tracker ___

[issue41092] Report actual size from 'os.path.getsize'

2020-06-23 Thread Stephen Finucane
New submission from Stephen Finucane : The 'os.path.getsize' API returns the apparent size of the file at *path*, that is, the number of bytes the file reports itself as consuming. However, it's often useful to get the actual size of the file, or the size of file on disk. It would be helpful