mkdir substitute

9 views
Skip to first unread message

Larry Kosher

unread,
Mar 7, 2022, 5:46:10 PM3/7/22
to emscripten-discuss
Hello.
I've been working on a project basically utilizing the following:
Consider the following example:

int main () {
        char command[300] = "mkdir 'test'";
        int status;

        status = system(command);
        if (status != 0)
              {
         printf(status);
         return -1;
              }
        return 0;
}

Compiled to wasm, it runs in node environment on Linux operating system but fails in a web environment. While I understand that this is a bad coding practice, I would prefer to leave the C-code untouched. Is it possible somehow to make a "fake" mkdir command that would call FS.createFolder in it?
Best regards,
Larry
Reply all
Reply to author
Forward
0 new messages