Macaulay2 » Documentation
Packages » Macaulay2Doc > The Macaulay2 language > file manipulation > mkdir
next | previous | forward | backward | up | index | toc

mkdir

Synopsis

Description

Only one directory will be made, so the components of the path p other than the last must already exist.

i1 : p = temporaryFileName() | "/"

o1 = /tmp/M2-771332-0/0/
i2 : mkdir p
i3 : isDirectory p

o3 = true
i4 : (fn = p | "foo") << "hi there" << close

o4 = /tmp/M2-771332-0/0/foo

o4 : File
i5 : get fn

o5 = hi there
i6 : removeFile fn
i7 : removeDirectory p

A filename starting with ~/ will have the tilde replaced by the home directory.

See also

For the programmer

The object mkdir is a compiled function.