FileTools - Maple Help

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

FileTools

 determine if the user has read permission for a file

Parameters

 file - filename or the file descriptor of an open file

Description

 • The IsReadable(file) command returns true if the user has read permission for the specified file.  If the user does not, 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{IsReadable}]\left("file"\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{FileTools}[\mathrm{Remove}]\left("file"\right)$