From Clomosy Docs
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
clPathCombine is a function that is part of the Clomosy library. This function | clPathCombine is a function that is part of the Clomosy library. This function returns a string data by concatenating the file path and file name. | ||
The general usage is as follows: | The general usage is as follows: | ||
Revision as of 08:07, 24 January 2024
clPathCombine is a function that is part of the Clomosy library. This function returns a string data by concatenating the file path and file name.
The general usage is as follows:
clPathCombine(FileNameString:WideString; CombinePathString:String);
FileNameString : Searched file name.
CombinePathString : The file path to merge.
For instance:
CombinedPath := clPathCombine('File.txt','C:\Document');
// Now CombinedPath will be 'C:\Document\File.txt'.
Example:
var
strList:TclStringList;
MyFileStr:String;
Begin
strList := Clomosy.StringListNew;
MyFileStr := clPathCombine('MyFile.Txt',Clomosy.AppFilesPath);
//ShowMessage(MyFileStr);
If clFileExists(MyFileStr,'C:\Clomosy') Then
strList.LoadFromFile(MyFileStr,0);
strList.Add('New Line');
strList.SaveToFile(MyFileStr,0);
End;