Get the current directory

From CodeCodex

Implementations[edit]

Common Lisp[edit]

(user-homedir-pathname)

Java[edit]

The working directory is the location in the file system from where the java command was invoked.

String curDir = System.getProperty("user.dir");

www.codecodex.com/wiki/index.php?title=Creating a Directory&action=edit

Java[edit]

    // Create a directory; all ancestor directories must exist
    boolean success = (new File("directoryName")).mkdir();
    if (!success) {
        // Directory creation failed
    }
    
    // Create a directory; all non-existent ancestor directories are
    // automatically created
    success = (new File("directoryName")).mkdirs();
    if (!success) {
        // Directory creation failed
    }

Tcl[edit]

set dir [pwd]