You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • I'd put them both in one module:

    function File() {
    }
    File.prototype.foo = ...;
    
    exports.createFile = ...;
    exports.File = File;
    
    // ...
    var myfs=require('FileSystem');
    myfs.File.prototype.mySpecialFunction = ...;
    var file=myfs.createFile('test.txt');
    
    

    In fact, in a lot of cases you don't actually need access to the File class directly, since it'll only be created by things like createFile.

    If you're doing this, please can you make your API the same as the existing filesystem - specifically the existing E.openFile function? It'd make life much easier for everyone.

    ... IMO it'd be ideal if someone could just compile all the existing FAT filesystem code into the ESP8266 port, and then it could even work with external SD cards if needed. While not perfect for flash memory, I'm sure it'd be good enough.

About

Avatar for Gordon @Gordon started