Topic Path: Symbol Reference > Functions > ServicesFilePath Function
ServicesFilePath Function

Determines the location of the services file for the local file system.

function ServicesFilePath: string;

String - Location of the services file on the local file system.

ServicesFilePath is a String function used to retrieve the path location for the services file that identifies the port number and protocols enabled for the local computer system. ServicesFilePath isolates the differences in the file systems for the host operating system or platform. 

The following table contains the values returned in ServicesFilePath: 


Operating System 
Services File Path 
/etc/services (Berkeley Unix standard file placement) 
C:winntsystem32driversetcservices (where C:winnt is the value from GetWindowsDirectory) 


Use IdPorts to retrieve a list of port numbers listed in the Services file found at the location specified by ServicesFilePath.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.