angerangel edited this page Jan 4, 2013 · 1 revision

USAGE

   IN-DIR dir block

DESCRIPTION

Evaluate a block while in a directory.

IN-DIR is a function value.

ARGUMENTS

  • dir -- Directory to change to (changed back after) (file!)
  • block -- Block to evaluate (block!)

#SOURCE

in-dir: make function! [  [
    "Evaluate a block while in a directory."
    dir [file!] "Directory to change to (changed back after)"
    block [block!] "Block to evaluate"
    /local old-dir
][
    old-dir: what-dir
    change-dir dir
    also do block change-dir old-dir
] ]
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.