next | previous | forward | backward | up | top | index | toc | home
Macaulay2 > The Macaulay2 language > file manipulation > isDirectory

isDirectory -- whether a file is a directory

Synopsis

Description

i1 : isDirectory "."

o1 = true
i2 : fn = temporaryFileName()

o2 = /tmp/M2-27924-1
i3 : fn << "hi there" << close

o3 = /tmp/M2-27924-1

o3 : File
i4 : isDirectory fn

o4 = false
i5 : removeFile fn

See also