JanetDocsI'm feeling luckyGithub sign in

os/cd



    cfunction

    (os/cd path)
    
    Change current directory to path. Returns nil on success, errors on
    failure.


1 exampleSign in to add an example
Loading...
# janet 1.10.1

# note that os/cd does not appear to update PWD in the shell's environment.
(os/cwd)           # => "/Users/cell/tmp"
(os/getenv "PWD")  # => "/Users/cell/tmp"
(os/cd "/tmp")     # => nil
(os/cwd)           # => "/private/tmp"  (on Apple, /tmp is actually /private/tmp)
(os/getenv "PWD")  # => "/Users/cell/tmp"
cellularmitosis