FileTools - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Programming : Input and Output : File Manipulation : FileTools : FileTools/IsDirectory

FileTools

 IsDirectory
 determine if a file is a directory

 Calling Sequence IsDirectory(file)

Parameters

 file - filename or the file descriptor of an open file

Description

 • The IsDirectory(file) command returns true if file refers to a directory.  If it is not a directory, false is returned.
 • If the file does not exist or an invalid file descriptor is passed, an exception is raised.

Examples

 > $\mathrm{FileTools}[\mathrm{Text}][\mathrm{WriteString}]\left("file","data"\right):$
 > $\mathrm{FileTools}[\mathrm{Text}][\mathrm{Close}]\left("file"\right):$
 > $\mathrm{FileTools}[\mathrm{IsDirectory}]\left("file"\right)$
 ${\mathrm{false}}$ (1)
 > $\mathrm{FileTools}[\mathrm{Remove}]\left("file"\right)$

## Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam