skx/monkey

Add more file/directory primitives.

skx opened this issue · 2 comments

skx commented

#47 covers a reworking of file/directory handling.

In addition to the work described there we should add:

  • file.stat()
    • As mentioned.
  • unlink
    • Delete a file/directory.
  • mkdir
    • Make a directory.
    • mkdir( "/tmp/foo/bar", { "mode": "0755" } )
skx commented

I guess I forgot:

  • chown
  • chgrp
  • chmod
skx commented

Ignored chgrp + chmod specifically because they require a Unix-system, and there are choices to be made:

 chmod( "/tmp/blah", "root") 

vs:

 chmod( "/tmp/blah", 0) 

The former is kinda OK, but the latter means we have to allow lookup of passwd-entries, to make the mapping from skx -> 1003, root -> 0, etc.