RosettaCodeData/Task/Truncate-a-file/Haskell/truncate-a-file.hs
2023-07-01 13:44:08 -04:00

5 lines
230 B
Haskell

setFileSize :: FilePath -> FileOffset -> IO ()
-- Truncates the file down to the specified length.
-- If the file was larger than the given length
-- before this operation was performed the extra is lost.
-- Note: calls truncate.