FileTools[Compressed] - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Input and Output : File Manipulation : FileTools : 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

fileFileTools[TemporaryFilename]catFileTools[TemporaryDirectory],kerneloptsdirsep,GZtest-

file:=/mnt/tmpfs/mpldoc_slot3/mpldoc2/GZtest-h9gGbgMG

(1)

fdFileTools[Compressed][Open]file

fd:=15512752

(2)

FileTools[Compressed][Write]fd,String1

7

(3)

dataStringTools[ToByteArray]String2

data:=8311611410511010350

(4)

FileTools[Compressed][Write]file,data

7

(5)

FileTools[Compressed][Close]fd

0

(6)

FileTools[Compressed][ReadFile]file,string

String1String2

(7)

FileTools[Remove]file

zipfileFileTools[TemporaryFilename]catFileTools[TemporaryDirectory],kerneloptsdirsep,GZtest-,.zip

zipfile:=/mnt/tmpfs/mpldoc_slot3/mpldoc2/GZtest-QJvmGwj6.zip

(8)

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

fd:=0

(9)

FileTools[Compressed][Write]fd,String1

7

(10)

FileTools[Compressed][Write]fd, String2

8

(11)

FileTools[Compressed][Close]fd

0

(12)

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

String1 String2

(13)

FileTools[Remove]zipfile

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]

 


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