Exists - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


FileTools

  

Exists

  

determine if a file exists in the file system or in the Workbook

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Exists(file)

Parameters

file

-

filename, the file descriptor of an open file or Workbook URI

Description

• 

The Exists(file) command checks the file system for a specified file. If the file exists, Exists returns true; otherwise, it returns false.

• 

If the file parameter is a Workbook URI, then the existence check is performed in a specified Workbook.

Examples

Working with files

FileToolsTextWriteFilefile,data

4

(1)

FileToolsExistsfile

true

(2)

FileToolsExistsdoesnotexist

false

(3)

FileToolsRemovefile

Working with Workbook

FileToolsExistsmaple://Start.maple/Start

true

(4)

FileToolsExistsmaple://Start.maple/Images/NewDocument.png

true

(5)

FileToolsExistsmaple://Start.maple/Entry that does not exist

false

(6)

Compatibility

• 

The FileTools[Exists] command was updated in Maple 2016.

See Also

file_types

FileTools

FileTools[IsDirectory]

FileTools[IsExecutable]

FileTools[IsReadable]

FileTools[IsWritable]

FileTools[ModificationTime]

FileTools[Remove]

FileTools[Size]

FileTools[Status]

FileTools[Text][Close]

FileTools[Text][WriteString]

IO_errors