* Implemented ExtractShortPathName

git-svn-id: trunk@9595 -
This commit is contained in:
michael 2007-12-30 21:45:48 +00:00
parent 130bac9c03
commit eec321b2f8
2 changed files with 13 additions and 2 deletions

View File

@ -113,9 +113,19 @@ begin
Result := '';
end;
function ExtractShortPathName(Const FileName : String) : String;
type
PathStr=string;
begin
{$ifdef MSWINDOWS}
SetLength(Result,Max_Path);
SetLength(Result,GetShortPathName(PChar(FileName), Pchar(Result),Length(Result)));
{$else}
Result:=FileName;
{$endif}
end;
type
PathStr=string;
{$DEFINE FPC_FEXPAND_SYSUTILS}

View File

@ -30,6 +30,7 @@ function ExtractFileDrive(const FileName: string): string;
function ExtractFileName(const FileName: string): string;
function ExtractFileExt(const FileName: string): string;
function ExtractFileDir(Const FileName : string): string;
function ExtractShortPathName(Const FileName : String) : String;
function ExpandFileName (Const FileName : string): String;
function ExpandUNCFileName (Const FileName : string): String;
function ExtractRelativepath (Const BaseName,DestNAme : String): String;