Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » system facilities » file manipulation » readDirectory
next | previous | forward | backward | up | index | toc

readDirectory -- read the contents of a directory

Description

i1 : dir = temporaryFileName()

o1 = /tmp/M2-30667-0/0
i2 : makeDirectory dir

o2 = /tmp/M2-30667-0/0
i3 : (fn = dir | "/" | "foo") << "hi there" << close

o3 = /tmp/M2-30667-0/0/foo

o3 : File
i4 : readDirectory dir

o4 = {., .., foo}

o4 : List
i5 : removeFile fn
i6 : removeDirectory dir

See also

For the programmer

The object readDirectory is a compiled function.


The source of this document is in Macaulay2Doc/functions/readDirectory-doc.m2:21:0.