truncate: get file size using file stat
Merge pull request #89 from Arcterus/truncate

truncate: get file size using file stat