tmemfiles1.nim 215 B

123456789101112
  1. import memfiles, os
  2. import std/syncio
  3. var
  4. mm: MemFile
  5. fn = "test.mmap"
  6. # Create a new file
  7. mm = memfiles.open(fn, mode = fmReadWrite, newFileSize = 20)
  8. mm.close()
  9. # mm.close()
  10. if fileExists(fn): removeFile(fn)