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.

97 lines
1.7 KiB

  1. package File::Spec::Functions;
  2. use File::Spec;
  3. use strict;
  4. use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
  5. $VERSION = '1.1';
  6. require Exporter;
  7. @ISA = qw(Exporter);
  8. @EXPORT = qw(
  9. canonpath
  10. catdir
  11. catfile
  12. curdir
  13. rootdir
  14. updir
  15. no_upwards
  16. file_name_is_absolute
  17. path
  18. );
  19. @EXPORT_OK = qw(
  20. devnull
  21. tmpdir
  22. splitpath
  23. splitdir
  24. catpath
  25. abs2rel
  26. rel2abs
  27. );
  28. %EXPORT_TAGS = ( ALL => [ @EXPORT_OK, @EXPORT ] );
  29. foreach my $meth (@EXPORT, @EXPORT_OK) {
  30. my $sub = File::Spec->can($meth);
  31. no strict 'refs';
  32. *{$meth} = sub {&$sub('File::Spec', @_)};
  33. }
  34. 1;
  35. __END__
  36. =head1 NAME
  37. File::Spec::Functions - portably perform operations on file names
  38. =head1 SYNOPSIS
  39. use File::Spec::Functions;
  40. $x = catfile('a','b');
  41. =head1 DESCRIPTION
  42. This module exports convenience functions for all of the class methods
  43. provided by File::Spec.
  44. For a reference of available functions, please consult L<File::Spec::Unix>,
  45. which contains the entire set, and which is inherited by the modules for
  46. other platforms. For further information, please see L<File::Spec::Mac>,
  47. L<File::Spec::OS2>, L<File::Spec::Win32>, or L<File::Spec::VMS>.
  48. =head2 Exports
  49. The following functions are exported by default.
  50. canonpath
  51. catdir
  52. catfile
  53. curdir
  54. rootdir
  55. updir
  56. no_upwards
  57. file_name_is_absolute
  58. path
  59. The following functions are exported only by request.
  60. devnull
  61. tmpdir
  62. splitpath
  63. splitdir
  64. catpath
  65. abs2rel
  66. rel2abs
  67. All the functions may be imported using the C<:ALL> tag.
  68. =head1 SEE ALSO
  69. File::Spec, File::Spec::Unix, File::Spec::Mac, File::Spec::OS2,
  70. File::Spec::Win32, File::Spec::VMS, ExtUtils::MakeMaker