本文整理自网络,侵删。
function GetFilepath(FileName: string): string; {从全路径中分离路径,有'\'}
var Contador: integer;
begin
Contador := 1;
while Copy(FileName, Length(FileName) - Contador, 1) <> '\' do
begin
Contador := Contador + 1;
end;
Result := (Copy(FileName, 1, Length(FileName) - Contador));
end;
相关阅读 >>
Delphi 在firemonkey应用程序中使用torientationsensor获取设备倾斜和指南针航向
更多相关阅读请进入《Delphi》频道 >>