Remove - Maple Help

FileTools

 Remove
 remove a file from the file system

 Calling Sequence Remove(file, file2, ...)

Parameters

 file1, file2, ... - one or more filenames or descriptors

Description

 • The Remove(file1, file2, ...) command deletes files from the file system.
 • The Remove function does not return anything.
 • If file refers to an open file, it is automatically closed and then deleted.
 • Errors that occur while removing individual files are tagged, and Remove continues until it reaches the end of the list, then throws an error reporting all files that it was unable to remove.

Examples

 > $\mathrm{FileTools}:-\mathrm{Text}:-\mathrm{WriteFile}\left("testfile","this is a test"\right)$
 ${15}$ (1)
 > $\mathrm{FileTools}:-\mathrm{Text}:-\mathrm{ReadFile}\left("testfile"\right)$
 ${"this is a test"}$ (2)
 > $\mathrm{FileTools}:-\mathrm{Remove}\left("testfile"\right)$

The file "testfile" cannot be read because it has been removed.

 > $\mathrm{FileTools}:-\mathrm{Text}:-\mathrm{ReadFile}\left("testfile"\right)$

 Error, (in FileTools:-Text:-ReadFile) file or directory does not exist: testfile