有沒有辦法查看是否正在使用tfile流的實例? 例如,如果我聲明FS型TFileStream的中,寫入緩衝器,並 使用tfilestream.free我可以檢查東西 像終於釋放流: if
tfilestream.NotActive
then
//code
if tfilestream.beingused then
//code
if tfilestream.free = true th
我一直工作在HTTP Web服務器應用程序(通過TIdHTTPWebBrokerBridge),並有一個小問題,當談到加載文件轉換成流(TFileStream)被髮送回撫養錯誤客戶。它不發生的每一次,但相當隨機...我不斷收到一個例外...... Cannot open file "C:\SomePath\SomeFile.html". The process cannot access the
這是其佔位符從https://forums.embarcadero.com/message.jspa?messageID=219481 if FileExists(dstFile) then
begin
Fs := TFileStream.Create(dstFile, fmOpenReadWrite);
try
Fs.Seek(Max(0, Fs.Size-102