Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change current working directory with Lua #170

Open
sineemore opened this issue Dec 18, 2018 · 4 comments
Open

Change current working directory with Lua #170

sineemore opened this issue Dec 18, 2018 · 4 comments

Comments

@sineemore
Copy link
Contributor

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
Copy link
Member

#1 ?

@naturallymitchell
Copy link
Member

//cc @sh-zam

@sineemore
Copy link
Contributor Author

@mitchtbaum
Oh, sure!
Will close and repost in #1

@sineemore
Copy link
Contributor Author

reposted #1 (comment)

dariusc93 added a commit that referenced this issue Dec 19, 2018
Note: It might be best to move this binding out of `fs` and maybe into something specific for the system.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants