FileTools[Compressed] - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Input and Output : File Manipulation : FileTools : Compressed Subpackage : FileTools/Compressed/Write

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/usr/local/repository/tmp/mpldoc_slot0/mpldoc2/GZtest-yYoYxV9R

(1)

fdFileToolsCompressedOpenfile

fd8123344

(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/usr/local/repository/tmp/mpldoc_slot0/mpldoc2/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]