FileTools - Maple Help

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

FileTools

 IsExecutable
 determine if the user has execute permission for a file

 Calling Sequence IsExecutable(file)

Parameters

 file - filename or the file descriptor of an open file

Description

 • The IsExecutable(file) command returns true if the user has execute permission for the specified file.  If the user does not, false is returned.
 • On Windows systems, the executable status of a file is determined by the file extension.  This may falsely return true for incorrectly named files.
 • 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{IsExecutable}]\left("file"\right)$
 ${\mathrm{false}}$ (1)
 > $\mathrm{FileTools}[\mathrm{Remove}]\left("file"\right)$