Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determining folder (directory) or file type

Status
Not open for further replies.

kirk124

Programmer
Apr 15, 2003
26
US
Hi,

Is there a way to determine whether a folder or file is a system folder or system file?

 
print "Its a file!\n" if(-f $path);
print "Its a directory!\n" if(-d $path);
print "Its a link!\n" if(-l $path);
print "Its a socket!\n" if(-S $path);

There are many others. See for more details.

Barbie
Leader of Birmingham Perl Mongers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top