How to create a symlink within browserFS

2019-08-20 21:02发布

问题:

I'm trying to create a symlink inside of BrowserFS.

I can confirm that BrowserFS can read sym links just fine... (I tested by making a zip file and loading it in, and doing fs.readFile and all is A-OK)

However, when I try to create a sym link via fs.symlink, I get an Error, I assume this is meaning it is not supported.

Can any of the folks out there that may use browserFS know how to propertly create, or any workarounds for creating symlinks?

One idea is to create the contents of a symlink and set file modes, but I had a hard time finding the exact way to do that. Any help appreciated!

I've included a codesandbox in case anyone is interested! https://codesandbox.io/s/43wroyjy9w