I would like to calculate the "size on disk" of a file in Python. Therefore I would like to determine the cluster size of the file system where the file is stored.
How do I determine the cluster size in Python? Or another built-in method that calculates the "size on disk" will also work.
I looked at os.path.getsize but it returns the file size in bytes, not taking the FS's block size into consideration.
I am hoping that this can be done in an OS independent way...