From Clomosy Docs
(Created page with "clPathCombine is a function that is part of the Clomosy library. This function performs the operation of combining two file paths or directory paths. In other words, when two paths are provided, this function combines them and returns the combined path as a result. The general usage is as follows: clPathCombine(FileNameString:WideString; CombinePathString:String); <span style="color:blue">''FileNameString''</span> : Searched file name. <span style="color:blue">''Com...") |
No edit summary |
||
| Line 28: | Line 28: | ||
strList.SaveToFile(MyFileStr,0); | strList.SaveToFile(MyFileStr,0); | ||
'''End;''' | '''End;''' | ||
= See Also = | |||
* [[Controls| Controls]] | |||
Revision as of 06:32, 24 January 2024
clPathCombine is a function that is part of the Clomosy library. This function performs the operation of combining two file paths or directory paths. In other words, when two paths are provided, this function combines them and returns the combined path as a result.
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;