Flush - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


FileTools

  

Flush

  

flush output for a buffered file

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Flush(file, file2, ...)

Parameters

file1, file2, ...

-

one or more names or file descriptors of open files to be flushed

Description

• 

The Flush(file1, file2, ...) command ensures that output, which has been written to the specified files that are assumed to have been opened either implicitly, by Text[Open] or by Binary[Open], is written to disk.

• 

The Flush function does not return anything.

• 

When a file is closed, it is automatically flushed.

Examples

> 

FileToolsTextOpen⁡testfile:

> 

FileToolsTextWriteString⁡testfile,This is a test\n

15

(1)
> 

ifkernelopts⁡platform=windowsthenssystem⁡type testfileelsessystem⁡cat testfileendif

0,

(2)
> 

FileToolsFlush⁡testfile

> 

ifkernelopts⁡platform=windowsthenssystem⁡type testfileelsessystem⁡cat testfileendif

0,This is a test

(3)
> 

FileToolsTextClose⁡testfile

See Also

file_types

FileTools

FileTools[Binary][Close]

FileTools[Binary][Open]

FileTools[Text][Close]

FileTools[Text][Open]

FileTools[Text][WriteString]

IO_errors