473 posts
Location
Poland
Posted 18 March 2012 - 12:52 PM
So i am writing a config file manager function for my API, but there seems to be no way of getting the relative path for a file other than shell.resolve, which doesn't seem to work for APIs. Any ideas?
108 posts
Posted 18 March 2012 - 12:55 PM
shell.resolve should work in an api
you could always write your own resolver
473 posts
Location
Poland
Posted 18 March 2012 - 12:57 PM
i am pretty sure it does not.
And right now I am too busy with bug fixes :D/>/>
108 posts
Posted 18 March 2012 - 01:04 PM
you're calling shell.resolve in a function, right? _G[shell] doesn't get set until shell is run. which happens after all the APIs are loaded
473 posts
Location
Poland
Posted 18 March 2012 - 01:15 PM
but i am loading the OS and them manually calling loadAPI. What's more, it works when i call it like a program and not an API.
108 posts
Posted 18 March 2012 - 01:20 PM
I just realized something, there should be no reason to use shell.resolve in an API, so why do you need to use it in an API?
473 posts
Location
Poland
Posted 18 March 2012 - 01:21 PM
i am writing a config file manager function for my API
…
108 posts
Posted 18 March 2012 - 01:39 PM
if it's an API the program using the API should be the thing resolving the paths
473 posts
Location
Poland
Posted 18 March 2012 - 02:09 PM
I guess I will just make do for now with absolute path and dump everything into root folder.