FileTools
IsWritable
determine if the user has write permission for a file
Calling Sequence
Parameters
Options
Description
Examples
IsWritable(file,opts)
file
-
filename or the file descriptor of an open file
opts
options as described below
exists=true or false
Indicates whether or file is expected to exist already. If true, IsWritable assumes file exists and will return an error if it does not. If false, IsWritable returns true or false depending on whether the user has rights to write to file, whether or not it exists. The default value is true.
The IsWritable(file) command returns true if the user has write 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.
FileToolsTextWriteFile⁡file,data
4
FileToolsIsWritable⁡file
true
FileToolsRemove⁡file
See Also
file_types
FileTools[Exists]
FileTools[IsDirectory]
FileTools[IsExecutable]
FileTools[IsReadable]
FileTools[ModificationTime]
FileTools[Remove]
FileTools[Size]
FileTools[Status]
FileTools[Text][Close]
FileTools[Text][WriteString]
IO_errors
Download Help Document