Leaked source code of windows server 2003
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.

93 lines
2.9 KiB

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