界面库

添加 目录相关的函数
This commit is contained in:
JianjunLiu 2023-07-17 10:38:23 +08:00
parent 42ee9c066c
commit 9123b517f5
2 changed files with 49 additions and 0 deletions

View File

@ -45,6 +45,13 @@ function CheckTslCode(code,err); //
//function TS_ExecPath();
//function TS_GetAppPath();
function TS_GetUserProfileHome();
function TS_GetUserProfileHomeInstance(t:integer):string;
function TS_GetUserConfigHome(t:integer):string;
function TS_GetHomePath(t:integer):string;
function TS_ModulePath():string;
function TS_ExecPath():string;
function TS_GetAppPath():string;
function TS_GetIniPath(t:integer;iname:string):string;
//function TS_GetIniPath(hometype,IniName);
function CopyUsedTslDllToNewDir(p);
/////////////////////////////////////////////
@ -6224,6 +6231,34 @@ function CreateDirWithFileName(fname);//ȷ
begin
return unit(utslvclauxiliary).CreateDirWithFileName(fname);
end
function TS_GetUserProfileHomeInstance(t:integer):string;
begin
return unit(utslvclauxiliary).TS_GetUserProfileHomeInstance(t);
end
function TS_GetUserConfigHome(t:integer):string;
begin
return unit(utslvclauxiliary).TS_GetUserConfigHome(t);
end
function TS_GetHomePath(t:integer):string;
begin
return unit(utslvclauxiliary).TS_GetHomePath();
end
function TS_ModulePath():string;
begin
return unit(utslvclauxiliary).TS_ModulePath();
end
function TS_ExecPath():string;
begin
return unit(utslvclauxiliary).TS_ExecPath();
end
function TS_GetAppPath():string;
begin
return unit(utslvclauxiliary).TS_GetAppPath();
end
function TS_GetIniPath(t:integer;iname:string):string;
begin
return unit(utslvclauxiliary).TS_GetIniPath(t,iname);
end
function DeleteAllFiles(path);//删除目录所有文件
begin

View File

@ -41,6 +41,13 @@ function HexFormatStrToTsl(D);
function DeleteAllFiles(path);
function CreateDirWithFileName(fname);
function TS_GetUserProfileHome();
function TS_GetUserProfileHomeInstance(t:integer):string;
function TS_GetUserConfigHome(t:integer):string;
function TS_GetHomePath(t:integer):string;
function TS_ModulePath():string;
function TS_ExecPath():string;
function TS_GetAppPath():string;
function TS_GetIniPath(t:integer;iname:string):string;
function gettslexefullpath();
type tuiglobaldata=class() //全局对象存储
static UIData;
@ -2972,6 +2979,13 @@ begin
end
end
function TS_GetUserProfileHome():string;cdecl;external {$ifdef linux}"libTSSVRAPI.so"{$else}"TSSVRAPI.dll"{$endif} name "TS_GetUserProfileHome";
function TS_GetUserProfileHomeInstance(t:integer):string;cdecl;external {$ifdef linux}"libTSSVRAPI.so"{$else}"TSSVRAPI.dll"{$endif} name "TS_GetUserProfileHomeInstance";
function TS_GetUserConfigHome(t:integer):string;cdecl;external {$ifdef linux}"libTSSVRAPI.so"{$else}"TSSVRAPI.dll"{$endif} name "TS_GetUserConfigHome";
function TS_GetHomePath(t:integer):string;cdecl;external {$ifdef linux}"libTSSVRAPI.so"{$else}"TSSVRAPI.dll"{$endif} name "TS_GetHomePath";
function TS_ModulePath():string;cdecl;external {$ifdef linux}"libTSSVRAPI.so"{$else}"TSSVRAPI.dll"{$endif} name "TS_ModulePath";
function TS_ExecPath():string;cdecl;external {$ifdef linux}"libTSSVRAPI.so"{$else}"TSSVRAPI.dll"{$endif} name "TS_ExecPath";
function TS_GetAppPath():string;cdecl;external {$ifdef linux}"libTSSVRAPI.so"{$else}"TSSVRAPI.dll"{$endif} name "TS_GetAppPath";
function TS_GetIniPath(t:integer;iname:string):string;cdecl;external {$ifdef linux}"libTSSVRAPI.so"{$else}"TSSVRAPI.dll"{$endif} name "TS_GetIniPath";
function IsTextUTF8(str)
begin
{utf8规则