File::PathInfo

oo access to path variables stat data about a file on disk
Download

File::PathInfo Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Leo Charre
  • Publisher web site:
  • http://search.cpan.org/~leocharre/

File::PathInfo Tags


File::PathInfo Description

oo access to path variables stat data about a file on disk File::PathInfo is a Perl module that provides an object oriented interface to things you want to know about a file, such as extension, absolute path, relative path, size, filename (without extension), etc. It is a sort of swissarmy knife of file info.A lot of times you need to know a file's absolute path, it's absolute location, maybe it's relative location to something else (like DOCUMENT ROOT), then you need to maybe know the relative path and relative location for a file. You need to know if a file is a directory, what it's extension is. You can commonly use regexes to do this.This module provides commonly needed variables.SYNOPSIS use File::PathInfo; my $f = new File::PathInfo; $f->set('/home/myself/public_html/folder/stew.txt) or die('file does not exist'); $f->is_text; # returns 1 $f->ext; # returns 'txt' $f->abs_loc; # returns '/home/myself/public_html/folder' Requirements: · Perl


File::PathInfo Related Software