fileSize property

int? get fileSize

Gets file size in bytes

Returns the file size in bytes or null if file doesn't exist or error occurs

Example:

final size = await '/path/to/document.pdf'.fileSize();
print(size); // 1024 (or null)

Implementation

int? get fileSize => QFileInfoUtils.getFileSize(this);