Last change
on this file since 36801 was
36801,
checked in by evhan, 2 years ago
|
wiki/eggref: update docs/formatting/urls and eggref/5/{r7rs,fancypants,chicken-belt}
|
File size:
899 bytes
|
Line | |
---|
1 | [[tags: egg]] |
---|
2 | |
---|
3 | == with-current-directory |
---|
4 | |
---|
5 | [[toc:]] |
---|
6 | |
---|
7 | == Description |
---|
8 | |
---|
9 | Convenience procedure for temporarily changing directories. |
---|
10 | |
---|
11 | The source for this extension is available [[https://git.foldling.org/chicken-with-current-directory.git|here]]. |
---|
12 | |
---|
13 | == Usage |
---|
14 | |
---|
15 | <procedure>(with-current-directory path thunk)</procedure> |
---|
16 | |
---|
17 | Changes directory to the given {{path}}, calls {{thunk}}, and restores the original working directory afterwards. |
---|
18 | |
---|
19 | Note that '''this procedure is not thread-safe'''. The current directory is a process-level value, and this extension makes no attempt to preserve thread-specific working directories across interrupts. If the calling thread is preempted or yields before the thunk's body returns, the given path will persist as the process's current working directory at least until the calling thread is resumed. |
---|
20 | |
---|
21 | == Author |
---|
22 | |
---|
23 | [[/users/evan-hanson|Evan Hanson]] |
---|
24 | |
---|
25 | == License |
---|
26 | |
---|
27 | Public Domain |
---|
Note: See
TracBrowser
for help on using the repository browser.