help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'sysutils' (#rtl)

DoDirSeparators

Convert known directory separators to the current directory separator.

Declaration

Source position: finah.inc line 41

procedure DoDirSeparators(

  var FileName: String

);

Description

This function replaces all known directory separators in FileName to the directory separator character for the current system. The list of known separators is specified in the DirSeparators constant.

Errors

None.

See also

ExtractFileName

  

Extract the filename part from a full path filename.

ExtractFilePath

  

Extract the path from a filename.

Example

Program Example32;

{ This program demonstrates the DoDirSeparators function }
{$H+}

Uses sysutils;

Procedure Testit (F : String);

begin
  Writeln ('Before : ',F);
  DoDirSeparators (F);
  Writeln ('After  : ',F);
end;

Begin
  Testit (GetCurrentDir);
  Testit ('c:\pp\bin\win32');
  Testit ('/usr/lib/fpc');
  Testit ('\usr\lib\fpc');
End.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505