Delphi快速从文件流读取数据存入本地txt
2020-02-17 07:50
567 查看
Delphi快速从文件流读取数据存入本地
var:
fs:TFileStream;
Path:string;
Buf4:array[0…3] of byte;
Str:string;
begin
fs := TFileStream.Create(Path+’*.map’, fmOpenRead or fmShareExclusive);
with fs do
begin
position:=0;
read(Buf4,4);
Str:=inttostr(Buf4[0]);
end;
fs.free;
with TStringList.Create do try
Add(Str);
SaveToFile(‘c:\temp.txt’);
finally
Free;
end;
end;
- 点赞
- 收藏
- 分享
- 文章举报
相关文章推荐
- Delphi Opendialog用法
- Delphi选择指定路径作为操作路径
- [转]Delphi 12种大小写转换的方法
- 如何给ActiveX数字签名(Step by Step, Delphi)
- Delphi还是那个Delphi,变化了的只是世界
- 再执牛耳,Delphi的安卓开发,效率与性能兼而有之,比之鱼与熊掌
- Delphi的资料和教程,多多的
- delphi中TreeView使用常见问题
- 用delphi写下载程序
- delphi技巧--分离汉字和英文字母
- delphi中var关键字
- Delphi和C++ Builder中的Hibernate开发(一)
- Delphi和C++ Builder中的Hibernate开发(六)
- 关于C#下写的Web Service 服务在Delphi下调用时的问题
- 简单工厂之Delphi实现
- Delphi 对对碰外挂 记录
- delphi TWebBrowser 详细解释
- 禁止 Delphi2010 检测新版本
- delphi TDbGrid 右键 P 4000 opupMenu 菜单只在有数据的地方弹出
- (转载)delphi文件流