Implement OS interface
And, define that interface in a first place.
- [x] Rename File to Os (python-like)
- [ ] Add Os.system()
- [ ] Add Os.stat()
- [x] Add Os.rename()
- [x] Add Os.info() - get OS information
What are the use cases for OS interface? Should it be just a dumping ground for things that don't fit into other interfaces (like Socket) and are offloaded to the hosting OS?
I assume that if we're running without an OS (on bare hardware) it's up to the vendor to implement particular methods.
For the start, file operations and starting processes (if there is an OS) is enough. And yes, Os would be a dumping ground. Main APIs that we anticipate are hardware (e.g. UART, SPI) to collect data from hardware, and networking (Fossa) to transmit that data outside.
How about replacing stat with exists, readable and writable? Mapping struct stat to JS is going to be awkward.
+1 for suggested rename