void FileFlush(int handle)
Flushes all data stored in the file buffer to the disk.
ディスクのファイル バッファにストアされたすべてのデータを書き換えします。
Notes: The FileFlush() function must be called between operations of file
reading and writing in the file.
注意:FileFlush() 関数は、ファイルの読み込みから、書き込み処理の間に呼び出す必要があります。
At file closing, the data are flushed to the disk automatically, so there
is no need to call the FileFlush() function before calling of the FileClose() function.
ファイルを閉じるときに、データは自動的に書き換えられるので、FileClose() 関数を呼び出す前に、FileFlush() 関数を呼び出す必要はありません。
Parameters:
パラメータ:
handle - File handle, returned by FileOpen() functions.
FileOpen() 関数によって返されたファイル ハンドル。
Sample:
サンプル:
int bars_count=Bars;
int handle=FileOpen("mydat.csv",FILE_CSV|FILE_WRITE);
if(handle>0)
{
FileWrite(handle, "#","OPEN","CLOSE","HIGH","LOW");
for(int i=0;i<bars_count;i++)
FileWrite(handle, i+1,Open[i],Close[i],High[i], Low[i]);
FileFlush(handle);
...
for(int i=0;i<bars_count;i++)
FileWrite(handle, i+1,Open[i],Close[i],High[i], Low[i]);
FileClose(handle);
}
|