FileTools - Maple Help

Online Help

All Products    Maple    MapleSim


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

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 existance check is performed in a specified Workbook.

Examples

Working with files

FileTools[Text][WriteString]file,data:

FileTools[Text][Close]file:

FileTools[Exists]file

true

(1)

FileTools[Exists]doesnotexist

false

(2)

FileTools[Remove]file

Working with Workbook

FileTools[Exists]maple://Start.maple/Start

true

(3)

FileTools[Exists]maple://Start.maple/Images/NewDocument.png

true

(4)

FileTools[Exists]maple://Start.maple/Entry that does not exist

false

(5)

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

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam