microsoft / pxt-filesystem

File system - beta
https://pxt.microbit.org/pkg/microsoft/pxt-filesystem
MIT License
28 stars 18 forks source link

Program Error: pxsim.files.createDirectory is not a function #11

Open scottaubrey opened 6 years ago

scottaubrey commented 6 years ago

While using the filesystem package in the I get an error trying to use settings save number in the Blockeditor or files.settingsSaveNumber in the javascript editor. The error message is:

Program Error: pxsim.files.createDirectory is not a function

ljcucc commented 6 years ago

me 2

xuefengedu commented 6 years ago

simulator is using another implementation: https://github.com/Microsoft/pxt-microbit/blob/master/sim/state/filesystem.ts, its namespace is "pxsim.files"

but this repository use another block with same "files" namespace, so there is some conflicts here. Current blocks: https://github.com/Microsoft/pxt-filesystem/blob/master/shims.d.ts

SERWare commented 6 years ago

me 2.

I don't know if it's related, but trying to run the line in the simulator:

let file = files.open("data.txt")

the error message is: "object doesn't support property or method fsOpen"