Re: Sphere 2.0 API: SphereFS
Reply #18 –
I have one issue.
Modules.
If I do "require('./file')", how does that work? Do we have two different systems, one being SphereFS for any file operation, and another syntax for require/resolve?
I think we should rethink this SphereFS to work with modules, for Pegasus. In Pegasus you really want relative paths for modules.
I do like having access to the games user directory: a requirement.
And indeed, absolute paths are neccesary for game loading/resource loading by user. Prefixing such is dangerous.
Also, I would not make this an extension but core. So you can always depend on it. It is annoying to do:
if (engine supports spherefs)
use path '~usr/save1.json'
else
use path 'C:.....'
When it is not neccessary, if we just enforce this kind of system.