Go to: Synopsis. Return value. Related. MEL examples.

Synopsis

fclose int

fclose is NOT undoable, NOT queryable, and NOT editable.

This command must be called with the file identifier returned by fopen after all file input/output is completed.

Return value

int

Related

feof, fflush, fgetline, fgetword, fopen, fprint, fread, frewind, fwrite, pclose, popen

MEL examples

// Write some data to a file and then close it
//
$exampleFileName = ( `internalVar -userTmpDir` + "example.tmp" );
$fileId=`fopen $exampleFileName "w"`;
fprint $fileId "Hello there\n";
fclose $fileId;