Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Languages Misc > Re: Getting pat...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 5 Topic 1136 of 1217
Post > Topic >>

Re: Getting path components

by Marco van de Voort <marcov@[EMAIL PROTECTED] > Apr 21, 2008 at 07:49 PM

On 2008-04-21, Aaron Gray <ang.usenet@[EMAIL PROTECTED]
> wrote:
> Has anyone got a code snippet to separate out the path components, ie
drive,
> path, filename, and extension ?

http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/objpas/sysutils/fina.inc?view=co

Some of the sets and constants are OS specific, here typical unix values:

 LineEnding = #10;
 LFNSup****t = true;
 DirectorySeparator = '/';
 DriveSeparator = '/';
 ExtensionSeparator = '.';
 PathSeparator = ':';
 AllowDirectorySeparators : set of char = ['\','/'];
 AllowDriveSeparators : set of char = [];
{ FileNameCaseSensitive is defined below! }
 maxExitCode = 255;
 {$ifdef LINUX}
 MaxPathLen = 4096; // linux has always got to be BIGGER
 {$else}
 MaxPathLen = 1024; // BSDs since 1993, Solaris 10, Darwin
 {$endif}
 AllFilesMask = '*';

const
  UnusedHandle    = -1;
  StdInputHandle  = 0;
  StdOutputHandle = 1;
  StdErrorHandle  = 2;

  FileNameCaseSensitive : boolean = true;
  CtrlZMarksEOF: boolean = false; (* #26 not considered as end of file *)

  sLineBreak = LineEnding;
  DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsLF;
 




 5 Posts in Topic:
Getting path components
"Aaron Gray" &l  2008-04-21 20:42:57 
Re: Getting path components
Marco van de Voort <ma  2008-04-21 19:49:06 
Re: Getting path components
"Aaron Gray" &l  2008-04-21 21:42:57 
Re: Getting path components
Mark Wooding <mdw@[EMA  2008-04-21 23:15:38 
Re: Getting path components
"Aaron Gray" &l  2008-04-22 02:19:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 23:42:29 CDT 2008.