FileTools[Compressed] - Maple Programming Help

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

FileTools[Compressed]

 Close
 close a previously opened compressed file

 Calling Sequence Close(file)

Parameters

 file - string, string in string, or integer file descriptor

Description

 • The Close command closes a file that has been opened with FileTools[Compressed][Open].

Examples

 > $\mathrm{file}≔\mathrm{FileTools}[\mathrm{TemporaryFilename}]\left(\mathrm{cat}\left(\mathrm{FileTools}[\mathrm{TemporaryDirectory}]\left(\right),\mathrm{kernelopts}\left(\mathrm{dirsep}\right),"GZtest-"\right)\right)$
 ${\mathrm{file}}{:=}{"/mnt/tmpfs/mpldoc_slot3/mpldoc2/GZtest-bx70dpPu"}$ (1)
 > $\mathrm{fd}≔\mathrm{FileTools}[\mathrm{Compressed}][\mathrm{Open}]\left(\mathrm{file}\right)$
 ${\mathrm{fd}}{:=}{21349552}$ (2)
 > $\mathrm{FileTools}[\mathrm{Compressed}][\mathrm{Close}]\left(\mathrm{fd}\right)$
 ${0}$ (3)
 > $\mathrm{FileTools}[\mathrm{Compressed}][\mathrm{Open}]\left(\mathrm{file}\right)$
 ${21570352}$ (4)
 > $\mathrm{FileTools}[\mathrm{Compressed}][\mathrm{Close}]\left(\mathrm{file}\right)$
 ${0}$ (5)
 > $\mathrm{FileTools}[\mathrm{Compressed}][\mathrm{Close}]\left(\mathrm{file}\right)$

Compatibility

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