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

Online Help

All Products    Maple    MapleSim


FileTools[Compressed]

  

Write

  

write data to a compressed file

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Write(file, data)

Parameters

file

-

string or integer file descriptor

data

-

string or rtable of hardware datatype numbers

Description

• 

The Write command compresses and writes data to a file that has been opened with FileTools[Compressed][Open].

Examples

fileFileToolsTemporaryFilenameFileToolsJoinPathFileToolsTemporaryDirectory,GZtest-

file/tmp/mpldoc1/GZtest-yYoYxV9R

(1)

fdFileToolsCompressedOpenfile

fd13506576

(2)

FileToolsCompressedWritefd,String1

7

(3)

dataStringToolsToByteArrayString2

data8311611410511010350

(4)

FileToolsCompressedWritefile,data

7

(5)

FileToolsCompressedClosefd

0

(6)

FileToolsCompressedReadFilefile,string

String1String2

(7)

FileToolsRemovefile

zipfileFileToolsTemporaryFilenamecatFileToolsTemporaryDirectory,kerneloptsdirsep,GZtest-,.zip

zipfile/tmp/mpldoc1/GZtest-bx70dpPu.zip

(8)

fd := FileTools[Compressed][Open]("dataOne" in zipfile,'mode'=WRITE);

fd0

(9)

FileToolsCompressedWritefd,String1

7

(10)

FileToolsCompressedWritefd, String2

8

(11)

FileToolsCompressedClosefd

0

(12)

FileTools[Compressed][ReadFile]("dataOne" in zipfile, string);

String1 String2

(13)

FileToolsRemovezipfile

Compatibility

• 

The FileTools[Compressed][Write] command was introduced in Maple 16.

• 

For more information on Maple 16 changes, see Updates in Maple 16.

See Also

FileTools[Compressed]

FileTools[Compressed][Close]

FileTools[Compressed][Open]

FileTools[Compressed][Read]

FileTools[Compressed][ReadFile]

FileTools[Remove]