Skip to content

Instantly share code, notes, and snippets.

@peterwang
Created July 14, 2013 19:42
Show Gist options
  • Save peterwang/5995576 to your computer and use it in GitHub Desktop.
Save peterwang/5995576 to your computer and use it in GitHub Desktop.
import System.Directory
import System.IO
testFileSize :: String -> Int -> IO ()
testFileSize filepath size = do
writeFile filepath $ replicate size '\0'
openFile filepath ReadMode >>= hFileSize >>= putStrLn.show
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment