core services

This commit is contained in:
Xuan Sang LE
2018-01-23 10:11:19 +01:00
parent 3fb336ed7c
commit c3e5b2749e
3 changed files with 70 additions and 0 deletions

15
src/core/vfs.coffee Normal file
View File

@ -0,0 +1,15 @@
self.OS.API.VFS =
readdir: (p, c, er) ->
h = _API.VFS.pathHandler p
h p,
(d ) -> c d
, (e, s) -> er e, s
pathHandler: (p) ->
list = p.split "///"
switch list[0]
when "app:"
return _API.handler.scanapp
else
return _API.handler.scandir