FileTools - Maple Programming Help

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}\left[\mathrm{Text}\right]\left[\mathrm{WriteFile}\right]\left("file","data"\right)$
 ${4}$ (1)
 > $\mathrm{FileTools}\left[\mathrm{IsDirectory}\right]\left("file"\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{FileTools}\left[\mathrm{Remove}\right]\left("file"\right)$