jazzdotdev / jazz

The Scripting Engine that Combines Speed, Safety, and Simplicity
Apache License 2.0
146 stars 11 forks source link

Change current working directory with Lua #170

Open sineemore opened 5 years ago

sineemore commented 5 years ago

Need something like fs.chdir to change current working directory with Lua.

Example usage:

local err = fs.chdir("/this/path/exists")
assert(err == nil, "Failed to chdir to existing directory")

local err = fs.chdir("/no/such/path")
assert(err != nil, "Chdir to nonexistent directory succeeded")

err should be string describing the failed syscall.

naturallymitchell commented 5 years ago

1 ?

naturallymitchell commented 5 years ago

//cc @sh-zam

sineemore commented 5 years ago

@mitchtbaum Oh, sure! Will close and repost in https://github.com/foundpatterns/torchbear/issues/1

sineemore commented 5 years ago

reposted https://github.com/foundpatterns/torchbear/issues/1#issuecomment-448390292