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