Skip to content
Portable current-working-directory changing
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Portable current-working-directory lookups and changes

This library aims to be a portable (cross-implementation and cross-platform) implementation of three things:

  • show the current-working-directory
  • change the current-working-directory
  • temporarily change the current working directory for a few operations, then change back


Once you've got it loaded you have access to three primitives:


  • Takes no arguments.
  • Returns the absolute pathname representing the current-working directory in a platform-independand way.


  • Takes one argument; the directory to change to (this can be given in relative, or absolute pathname or string formats)
  • Returns the new current-working-directory
  • Errors if it can't cd into the target for some reason (for example if it doesn't exist, or if you have insufficient permissions)


  • Takes a directory (in the same formats as cl-cwd:cwd), and a body argument
  • Runs the body forms in the context of the specified directory, then returns to the original directory. unwind-protect is present, so it'll return in case of errors too.
You can’t perform that action at this time.