Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.5 KiB

  1. package File::Spec;
  2. use strict;
  3. use vars qw(@ISA $VERSION);
  4. $VERSION = '0.8';
  5. my %module = (MacOS => 'Mac',
  6. MSWin32 => 'Win32',
  7. os2 => 'OS2',
  8. VMS => 'VMS');
  9. my $module = $module{$^O} || 'Unix';
  10. require "File/Spec/$module.pm";
  11. @ISA = ("File::Spec::$module");
  12. 1;
  13. __END__
  14. =head1 NAME
  15. File::Spec - portably perform operations on file names
  16. =head1 SYNOPSIS
  17. use File::Spec;
  18. $x=File::Spec->catfile('a', 'b', 'c');
  19. which returns 'a/b/c' under Unix. Or:
  20. use File::Spec::Functions;
  21. $x = catfile('a', 'b', 'c');
  22. =head1 DESCRIPTION
  23. This module is designed to support operations commonly performed on file
  24. specifications (usually called "file names", but not to be confused with the
  25. contents of a file, or Perl's file handles), such as concatenating several
  26. directory and file names into a single path, or determining whether a path
  27. is rooted. It is based on code directly taken from MakeMaker 5.17, code
  28. written by Andreas KE<ouml>nig, Andy Dougherty, Charles Bailey, Ilya
  29. Zakharevich, Paul Schinder, and others.
  30. Since these functions are different for most operating systems, each set of
  31. OS specific routines is available in a separate module, including:
  32. File::Spec::Unix
  33. File::Spec::Mac
  34. File::Spec::OS2
  35. File::Spec::Win32
  36. File::Spec::VMS
  37. The module appropriate for the current OS is automatically loaded by
  38. File::Spec. Since some modules (like VMS) make use of facilities available
  39. only under that OS, it may not be possible to load all modules under all
  40. operating systems.
  41. Since File::Spec is object oriented, subroutines should not called directly,
  42. as in:
  43. File::Spec::catfile('a','b');
  44. but rather as class methods:
  45. File::Spec->catfile('a','b');
  46. For simple uses, L<File::Spec::Functions> provides convenient functional
  47. forms of these methods.
  48. For a list of available methods, please consult L<File::Spec::Unix>,
  49. which contains the entire set, and which is inherited by the modules for
  50. other platforms. For further information, please see L<File::Spec::Mac>,
  51. L<File::Spec::OS2>, L<File::Spec::Win32>, or L<File::Spec::VMS>.
  52. =head1 SEE ALSO
  53. File::Spec::Unix, File::Spec::Mac, File::Spec::OS2, File::Spec::Win32,
  54. File::Spec::VMS, File::Spec::Functions, ExtUtils::MakeMaker
  55. =head1 AUTHORS
  56. Kenneth Albanowski <F<[email protected]>>, Andy Dougherty
  57. <F<[email protected]>>, Andreas KE<ouml>nig
  58. <F<[email protected]>>, Tim Bunce <F<[email protected]>>. VMS
  59. support by Charles Bailey <F<[email protected]>>. OS/2 support by
  60. Ilya Zakharevich <F<[email protected]>>. Mac support by Paul Schinder
  61. <F<[email protected]>>.