.. _File.length: ================================================ File.length ================================================ :ref:`number` **length** Description ----------- The size of the file in bytes. Can be set only for a file that is not open, in which case it truncates or pads the file with 0-bytes to the new length.