summaryrefslogtreecommitdiff
path: root/lib/File
Commit message (Collapse)AuthorAgeFilesLines
* [doc] clarify behavior of File::Copy::cp re: permissionsLukas Mai2023-03-241-4/+7
| | | | | | In particular, explain that "preserve permission bits like cp" means the default behavior of /bin/cp, not "cp -p" or "cp --preserve", so the umask still applies.
* [doc] Update File::Basename synopsisElvin Aslanov2022-08-301-5/+5
| | | Add `my` on examples.
* [doc] Update File::Copy synopsisElvin Aslanov2022-08-301-6/+6
| | | Add `my` to examples for better practice.
* [doc] Update File::stat synopsisElvin Aslanov2022-08-261-2/+2
| | | | | | | Added `my` to Synopsis for better practice. Repository points to GH: https://metacpan.org/pod/File::stat
* Fix bundled .pm files for experimental::builtin warningsPaul "LeoNerd" Evans2022-01-251-1/+2
|
* Modernise File::Compare a littleJames Raspass2021-12-161-15/+7
| | | | | | | | - Move the version to the package line and bump it. - Bump use version now that we're using package NAME VER. - Drop strict now that we get it from use version. - Switch to non-inheritance based Exporter usage. - Use defined-or operator.
* Fix indirect call of ->importPaul "LeoNerd" Evans2021-12-141-2/+2
|
* No need for avoiding overload in File::CopyPaul "LeoNerd" Evans2021-12-141-8/+5
|
* do not count tests, instead use done_testing()Michiel Beijen2021-12-043-4/+7
| | | | | | | | | | | | | | | Having to count tests is annoying for maintainers. Also, manually updating count tests is problematic when multiple people are working on the same code; it causes merge conflicts and recounts. done_testing() is available since Test::More 0.88 which was released in 2009. This commit changes all tests under lib/ that use Test::More and were planning the number of tests. Michiel Beijen is now a Perl author
* Remove DOS/DJGPP supportDagfinn Ilmari Mannsåker2021-11-022-3/+2
| | | | | | DJGPP is a port of the GNU toolchain to 32-bit x86 systems running DOS. The last known attempt to build Perl on it was on 5.20, which only got as far as building miniperl.
* Remove NetWare supportDagfinn Ilmari Mannsåker2021-10-081-2/+1
| | | | The build has been broken since 2009.
* Haiku BFS does not store atime and always return current timeThibault Duponchelle2021-07-132-7/+15
|
* File::Copy: compare inode numbers as stringsTony Cook2021-05-251-2/+2
| | | | as recommended in perldoc -f stat
* File::stat - Fix typo in synopsisDan Book2021-05-201-2/+2
|
* File::Copy: support symlinks on Win32Tony Cook2020-12-012-3/+6
|
* more closely match File::stat's -X behaviour to built-in on cygwinTony Cook2019-11-261-2/+3
|
* prevent a race between name-based stat and an open modifying atimeTony Cook2019-11-071-2/+4
| | | | | | | | | Most linux systems rarely update atime, so it's very unlikely for this issue to trigger there, but on a system with classic atime behaviour this was a race between open modifying atime and time() ticking over. gh #17234
* fix typosAlexandr Savca2018-10-091-2/+2
| | | | | | | | Committer: For porting tests: Update $VERSION in 4 files. Run: ./perl -Ilib regen/mk_invlists.pl ./perl -Ilib regen/regcharclass.pl
* Merge branch 'smoke-me/jkeenan/afresh/132401-file-copy' into bleadJames E Keenan2017-11-122-2/+9
|\
| * Increment $File::Copy::VERSIONJames E Keenan2017-11-061-1/+1
| |
| * Support Time::HiRes::utime in File::CopyAndrew Fresh2017-11-062-1/+8
| | | | | | | | | | | | | | If Time::HiRes exists and has utime support for setting hires utime, use that so cross-device moves can keep time accurately. Used by autoconf.
* | Replace multiple 'use vars' by 'our' in libNicolas R2017-11-111-3/+9
|/ | | | | | | | Using vars pragma is discouraged and has been superseded by 'our' declarations available in Perl v5.6.0 or later. This commit is about replacing the usage of 'vars' pragma by 'our' in 'lib' directory.
* avoid sysread()/syswrite() warnings from the default :utf8 from PERL_UNICODETony Cook2017-09-201-1/+6
| | | | | | | | | | | | In a UTF-8 locale, if the PERL_UNICODE environment variable is set, perl may add a :utf8 layer. v5.23.1-197-gfb10a8a deprecated using sysread(), syswrite() etc on such handles, which meant that a test run under PERL_UNICODE could produce a significant number of deprecation warnings. Prevent those warnings, typically by binmode(), but in one case by disabling the warning.
* Switch most open() calls to three-argument form.John Lightsey2016-12-233-20/+20
| | | | | | | | | | Switch from two-argument form. Filehandle cloning is still done with the two argument form for backward compatibility. Committer: Get all porting tests to pass. Increment some $VERSIONs. Run: ./perl -Ilib regen/mk_invlists.pl; ./perl -Ilib regen/regcharclass.pl For: RT #130122
* (perl #128199) rmscopy() is VMS specific and not exportedTony Cook2016-06-151-1/+6
| | | | | | The first is kind of implied by the text, but make it explicit. Added minor punctuation fixes suggested by Reuben Thomas.
* Bump $File::Copy::VERSIONDominic Hargreaves2016-04-301-1/+1
|
* File::Copy: add a warning about flushing writesDominic Hargreaves2016-04-301-0/+8
| | | | Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=494590
* Replace common Emacs file-local variables with dir-localsDagfinn Ilmari Mannsåker2015-03-221-5/+0
| | | | | | | | | | | | | | | | An empty cpan/.dir-locals.el stops Emacs using the core defaults for code imported from CPAN. Committer's work: To keep t/porting/cmp_version.t and t/porting/utils.t happy, $VERSION needed to be incremented in many files, including throughout dist/PathTools. perldelta entry for module updates. Add two Emacs control files to MANIFEST; re-sort MANIFEST. For: RT #124119.
* Stop test suite filling /tmpDavid Mitchell2014-12-031-1/+1
| | | | | | | | | | | | | | | | | | | Some test files use File::Temp in such a way that the temporary files and directories under /tmp aren't deleted at the end. On a smoker system, this can gradually accumulate thousands of entries under /tmp. The general culprits fixed by this commit are: 1) using tempfile() without the UNLINK => 1 argument; 2) Using Test::More (which uses Test::Stream), which creates a test directory in such a way that only the original parent thread will remove it; for some reason I still don't fully understand, detaching a thread rather than joining it stops this clean up happening. In the affected test files, I replaced the ->detach() with a ->join() just before exit, and the problem went away. Some tests under cpan/ are still leaky; these will be addressed upstream.
* these permissions appear to be handled correctly in current cygwinTony Cook2014-10-201-6/+2
| | | | | | this TODO has been passing on my smoke testers for years, if it turns out it isn't passing for someone, it should probably be skipped instead of TODOed to prevent the noise.
* use a different name for the test directoryTony Cook2014-10-201-5/+6
| | | | | | on Windows (cygwin) I was getting rare failures creating $copy1 with an error complaining that it was a directory, possibly due to some background process tracking directories.
* File::Copy does not overwrite read-only filesAlexandr Ciornii2014-07-141-1/+2
|
* Bump File::Copy to version 2.29.Craig A. Berry2013-12-211-1/+1
|
* Simplify and clarify VMS specifics in File::Copy.Craig A. Berry2013-12-211-33/+19
| | | | | | | | | 4c38808d92b95 added some logic to make a "to" path with no directory component inherit from the current working directory rather than the directory portion of the "from" path. It also added a trailing dot to make null file types unambiguous. But the comments emphasized the latter and made no mentin of the former, and the implementation was unnecessarily complex.
* Revert "Unix compatibility mode" in File::Copy on VMS.Craig A. Berry2013-12-211-85/+4
| | | | | | | | | | This backs out the changes introduced in fc06fdeb76c89. On reflection, it doesn't make any sense to support what is actually a Unix *report* mode in an API that does not report filenames. File::Copy just needs to supply names to the underlying copy functions that they can operate on. How those names are presented is of no concern here as we don't present them to the caller.
* Fix typo introduced in 4c38808d92b95.Craig A. Berry2013-12-211-1/+1
| | | | | | The variable name is '$^O' not '-$^O'. This meant File::Copy::move didn't put the file in the current working directory when the to argument had no path component.
* bump File::Copy's $VERSIONTony Cook2013-09-181-1/+1
|
* Added note about directories not being created with File::Copy::copyNathan Glenn2013-09-181-2/+4
|
* Convert to use of Test::More. Boost test coverage.James E Keenan2013-07-101-58/+71
| | | | | | | | | | Since File::Compare's functions are documented to return 1, 0, or -1, we will continue to examine the return value in our tests, rather than simply checking for truth when 0 or 1 is returned. Following code review, eliminate trailing whitespace. For: RT #118823
* Add block to exercise case of very large buffer in lib/File/Copy.pm.James E Keenan2013-07-081-4/+17
|
* Move File::Find from lib/ to ext/Nicholas Clark2013-07-053-2475/+0
|
* Change File::Find's tests to look for taint.t instead of commonsense.tNicholas Clark2013-07-052-12/+12
| | | | | | | | | This passes whether the tests are in lib/ (and hence run with the CWD as t/) or in ext/File-Find (and hence run with that as the CWD) because they find t/op/taint.t or ext/File-Find/t/taint.t respectively. Change taint.t to count the number of times it finds a file named taint.t, and fail if the count isn't 1. find.t was already testing a count.
* Improve the BEGIN-time setup code for File::Find's tests.Nicholas Clark2013-07-052-25/+19
| | | | | | | | | In find.t merge the two BEGIN blocks and eliminate the redundant C<use File::Spec;> In both, don't attempt to change directory to t/ (which will be unhelpful once File::Find is moved to ext/) Only make paths in @INC absolute if $ENV{PERL_CORE} is set (which will ease making File::Find dual-life, if we want to this.)
* Add test for undefined first argument to fileparse().James E Keenan2013-07-041-1/+7
|
* Increase $File::Basename::VERSION to 2.85Father Chrysostomos2013-06-221-1/+1
|
* Fixed verbatim lines in POD over 79 charactersBrian Gottreu2013-06-221-8/+8
|
* prevent lib/File/stat.t from aborting at END on cygwinTony Cook2013-06-111-2/+4
| | | | | | | | | cygwin appears to be unique in that it uses fast_abs_path() for abs_path() and vaguely follows POSIX semantics on directory permissions. Previously the tempdir created would be chmod() to 0600 (non-executable) and fast_abs_path() would croak when it couldn't chdir into the directory.
* use more descriptive examples in File::CopyZsbán Ambrus2013-06-091-3/+3
|
* typo fix for File::FindDavid Steinbrunner2013-05-251-2/+2
| | | | Bump $VERSION for File::Find.
* Bump File::Copy version as the contents have changedChris 'BinGOs' Williams2013-03-051-1/+1
|