"RtcInfo.Pas 파일에 존재하는 File Control관련 함수들입니다."
Local File access functions (rtcInfo.pas)
Here is a list of functions from RTC, which you can use to work with local files:
// Does file with name “fname” exist?
function File_Exists(const fname:string):boolean;
// Size of the file with name “fname”
function File_Size(const fname:string):int64;
// Read “Size” bytes of file “fname”, starting at “Loc” (0=beginning)
function Read_File(const fname:string;
Loc,Size:int64):string; overload;
// Read complete file “fname”
function Read_File(const fname:string):string; overload;
{ Scan up to “Size” bytes of file “fname” for string “search_string”, starting at “Loc” (0=beginning), using up to “BufferSize” memory for scanning. Larger buffer size will increase scanning speed, but also use more memory. Recommended is a “BufferSize” values of 16000 or more bytes. If “search_string” is found, its location in file is returned (0=beginning). If “search_string” is not found, this function returns -1. }
function Scan_File(const fname,
search_string:string;
BufferSize:integer;
Loc,Size:int64):int64;
// Delete file “fname”
procedure Delete_File(const fname:string);
// Write “Data” to file “fname” starting at “Loc” (0=beginning).
function Write_File(const fname:string;
const Data:string;
Loc:int64):boolean; overload;
// Write “Data” to file “fname”, overwriting old file.
function Write_File(const fname:string;
const Data:string):boolean; overload;
// File date and time
function File_Age(const fname:string):TDateTime;
// Get Temporary Directory path
function GetTempDirectory: String;
// Get Temporary File Name inside a Temporary Directory
function GetTempFile:string;
// Does file with name “fname” exist?
function File_Exists(const fname:string):boolean;
// Size of the file with name “fname”
function File_Size(const fname:string):int64;
// Read “Size” bytes of file “fname”, starting at “Loc” (0=beginning)
function Read_File(const fname:string;
Loc,Size:int64):string; overload;
// Read complete file “fname”
function Read_File(const fname:string):string; overload;
{ Scan up to “Size” bytes of file “fname” for string “search_string”, starting at “Loc” (0=beginning), using up to “BufferSize” memory for scanning. Larger buffer size will increase scanning speed, but also use more memory. Recommended is a “BufferSize” values of 16000 or more bytes. If “search_string” is found, its location in file is returned (0=beginning). If “search_string” is not found, this function returns -1. }
function Scan_File(const fname,
search_string:string;
BufferSize:integer;
Loc,Size:int64):int64;
// Delete file “fname”
procedure Delete_File(const fname:string);
// Write “Data” to file “fname” starting at “Loc” (0=beginning).
function Write_File(const fname:string;
const Data:string;
Loc:int64):boolean; overload;
// Write “Data” to file “fname”, overwriting old file.
function Write_File(const fname:string;
const Data:string):boolean; overload;
// File date and time
function File_Age(const fname:string):TDateTime;
// Get Temporary Directory path
function GetTempDirectory: String;
// Get Temporary File Name inside a Temporary Directory
function GetTempFile:string;