IsWritable - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


FileTools

  

IsWritable

  

determine if the user has write permission for a file

 

Calling Sequence

Parameters

Options

Description

Examples

Calling Sequence

IsWritable(file,opts)

Parameters

file

-

filename or the file descriptor of an open file

opts

-

options as described below

Options

• 

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.

Description

• 

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.

Examples

FileToolsTextWriteFilefile,data

4

(1)

FileToolsIsWritablefile

true

(2)

FileToolsRemovefile

See Also

file_types

FileTools

FileTools[Exists]

FileTools[IsDirectory]

FileTools[IsExecutable]

FileTools[IsReadable]

FileTools[ModificationTime]

FileTools[Remove]

FileTools[Size]

FileTools[Status]

FileTools[Text][Close]

FileTools[Text][WriteString]

IO_errors