-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export necessary interfaces to enable client-implemented FS's #200
Comments
If I go the latter path following Dropbox backend example, is there a way to access/extend BaseFileSystem (I am consuming BrowserFS from my own TypeScript code) which seems not exported from browserfs.ts? |
Hey @vadimkantorov, I think implementing a FileSystem directly is the right way to go. I am probably not exporting all of the types / classes you need. I'll accept a PR that exports |
I've clone this repo, ran
Is there something trivial I missed? (new to TypeScript and modern JS) |
It's possible NPM pulled in a newer version of TypeScript that doesn't work. Have you tried using |
|
You're using BrowserFS from master, which uses the latest Dropbox JS SDK. The latest Dropbox JS SDK ships types directly (which I wrote myself! :-) ), so you need to do
declare type SharedArrayBuffer = ArrayBuffer; |
Thanks for the suggestion. ES2017 helped for the SharedArrayBuffer!
Btw the Dropbox npm package pulls another 20 packages as dependencies. It would be cool if the Dropbox backend / dependency was optional. |
I checked the source of dropbox sdk (npm package dropbox), it contains The backend, dropbox_bridge somehow use DropboxTypes without it being explicitly imported. Can this work? Maybe the Dropbox sdk has been updated in the meanwhile? |
Going off d2aad42 (the latest commit at the time of writing), all of the necessary classes, variables, and types are exported. |
Hi, I'm looking to teach BrowserFS understand JupyterLab's API for fetching files from the server (at the end of the day I'd like to mount this FS to Emscripten's FS).
JLab exposes an API endpoint that lets you request:
http://localhost:8888/api/contents/FILE_PATH.json?format=text&type=file&content=1&1505946940755
with a response similar to:http://localhost:8888/api/contents/DIRECTORY_PATH?content=1&1505946940778
with a response similar to:So far my understanding is that BrowserFS (HTTPRequest in particular) lets you specify a full root directory tree at FS creation time and does not allow to provide a callback to process the server response to extract the file contents. Is my understanding correct?
Would you have an advice how to expose JLab remote file system to BrowserFS in the easiest way? Which existing backend would be the right base to build upon?
As I am coding a JLab extension, I have access to JLab's Contents.IManager directly. Should I rather implement the FileSystem interface directly like the Dropbox backend does?
Thank you!
The text was updated successfully, but these errors were encountered: