delphi实现两个目录路径的链接
生活随笔
收集整理的這篇文章主要介紹了
delphi实现两个目录路径的链接
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
filepath := PathJoin(['C:', 'path1', 'path2\', 'a.doc']);
// filepath = 'C:\path1\path2\a.doc'
代碼:
function PathJoin(const Args: array of string): string;
varlen: Integer;i: Integer;s: string;
begins := '';len := length(Args);for i := 0 to len-1 dobeginif s = '' thenbegins := s + Args[i]endelsebeginif Args[i] <> '' thens := IncludeTrailingPathDelimiter(s) + Args[i];end;end;Result := s;
end;
?
轉載于:https://www.cnblogs.com/yzryc/p/6276989.html
總結
以上是生活随笔為你收集整理的delphi实现两个目录路径的链接的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: swift textView字数限制,t
- 下一篇: 前端工具网站推荐