Nobuyoshi Nakada
d21e4e76c4
[ruby/fileutils] Make ln_s
forward target_directory
to ln_sr
...
b487f09eed
2025-07-19 15:44:55 +00:00
Nobuyoshi Nakada
f62e9f2b53
[ruby/fileutils] A workaround for RBS
...
c3abf39e7a
2025-07-19 14:48:29 +00:00
Nobuyoshi Nakada
a116871258
[ruby/fileutils] A workaround for RBS
...
fde0f0713a
2025-07-19 14:48:29 +00:00
Nobuyoshi Nakada
5a8e87cb2e
[ruby/fileutils] Just the parent path of the destination symlink should exist
...
71225b1b46
2025-07-19 14:09:50 +00:00
Erik Berlin
4431ca5363
[ruby/fileutils] FileUtils.remove_dir checks directory
...
f0d7fc817b
2025-07-19 13:54:45 +00:00
Nobuyoshi Nakada
3dced7955c
[ruby/fileutils] Use shorter symlink by real paths
...
277f7f2ff8
2025-07-19 13:47:48 +00:00
Nobuyoshi Nakada
de68f22042
[ruby/fileutils] Fix up FileUtils#ln_sr
...
2836a164ed
2025-07-19 13:47:47 +00:00
Nobuyoshi Nakada
7725442022
[ruby/fileutils] If noop
, return before checking the argument
...
Get rid of failure in rbs.
e44b7b366c
2025-07-18 10:13:30 +00:00
Akihiko Odaki
eeb682c51b
[ruby/fileutils] [DOC] Fix optional argument descriptions
...
Several optional positional arguments were incorrectly denoted as
keyword arguments so correct them.
c25f069f96
2025-07-18 09:25:15 +00:00
Nobuyoshi Nakada
cfe8263f41
[ruby/fileutils] Fix ln_sf
with multiple sources and target_directory: false
...
In this case, an ArgumentError is now raised rather than ignoring the
option, just as GNU coreutils' `ln` would error on the command line.
Fixes https://github.com/ruby/fileutils/pull/128 as well.
4fc578a75f
2025-07-18 09:22:34 +00:00
Hiroshi SHIBATA
314b556cc5
[ruby/fileutils] Bump up v1.7.3
...
c138e67613
2024-11-01 05:04:32 +00:00
Nobuyoshi Nakada
5ab6b3181f
[ruby/fileutils] [DOC] FileUtils::VERSION
...
48742e2921
2024-02-21 16:57:30 +00:00
Nobuyoshi Nakada
2edc14be69
[ruby/fileutils] [DOC] nodoc for private methods and module
...
75c6010aab
2024-02-21 16:57:30 +00:00
Yusuke Endoh
25d74b9527
Do not include a backtick in error messages and backtraces
...
[Feature #16495 ]
2024-02-15 18:42:31 +09:00
Hiroshi SHIBATA
9857499d3d
[ruby/fileutils] Bump up 1.7.2
...
577fd38f15
2023-11-07 07:15:34 +00:00
Hiroshi SHIBATA
6fb6d85aee
[ruby/fileutils] Bump up v1.7.1
...
7138d85156
2023-04-03 05:19:00 +00:00
Takashi Kokubun
23ec248e48
s/mjit/rjit/
2023-03-06 23:44:01 -08:00
Burdette Lamar
5fb64f5230
[ruby/fileutils] Remove (newly unneeded) remarks about aliases
...
(https://github.com/ruby/fileutils/pull/108 )
bbe595cfa5
2023-02-19 22:50:41 +00:00
Satadru Pramanik, DO, MPH, MEng
94aed6ece5
[ruby/fileutils] Add mkdir_p to FileUtils.install
...
(https://github.com/ruby/fileutils/pull/104 )
* Add mkdir_p to FileUtils.install
* Adjust raise message.
* adjust raise language
* handle trailing slash in dest
* simplify
* Add tests
2023-02-10 03:37:39 +00:00
Hiroshi SHIBATA
05caafb473
[ruby/fileutils] Bump version to 1.7.0
...
213e6a3d1f
2022-12-05 06:12:31 +00:00
Nobuyoshi Nakada
c6330cd32b
[ruby/fileutils] [Feature #18925 ] Add ln_sr
method and relative:
option to ln_s
...
5116088d5c
2022-11-25 01:03:57 +00:00
Yusuke Endoh
72c7dba436
[ruby/fileutils] Revert "FileUtils.rm* methods swallows only Errno::ENOENT when force is true"
...
This reverts commit fa65d676ec
.
This caused some incompatibility problems in real-world cases.
https://bugs.ruby-lang.org/issues/18784#change-98927
https://bugs.ruby-lang.org/issues/18784#change-98967
42983c2553
2022-11-07 11:25:25 +00:00
Nobuyoshi Nakada
3539da64fc
[DOC] Replace the external URIs to docs with rdoc-ref
2022-10-12 12:27:40 +09:00
Yusuke Endoh
983115cf3c
[ruby/fileutils] FileUtils.rm* methods swallows only Errno::ENOENT when force is true
...
... instead of any StandardError.
To behave like the standard `rm` command, it should only ignore
exceptions about not existing files, not every exception. This should
make debugging some errors easier, because the expectation is that `rm
-rf` will succeed if and only if, all given files (previously existent
or not) are removed. However, due to this exception swallowing, this is
not always the case.
From the `rm` man page
> COMPATIBILITY
>
> The rm utility differs from historical implementations in that the -f
> option only masks attempts to remove non-existent files instead of
> masking a large variety of errors.
fa65d676ec
Co-Authored-By: David Rodríguez <deivid.rodriguez@riseup.net>
2022-08-23 16:52:41 +09:00
Yusuke Endoh
96562a517d
[ruby/fileutils] Narrow the scope of ensure
...
The ensure in postorder_traverse was added for [Bug #6756 ].
The intention was to try to delete the parent directory if it failed to
get the children. (It may be possible to delete the directory if it is
empty.)
However, the ensure region rescue'ed not only "failure to get children"
but also "failure to delete each child". Thus, the following raised
Errno::ENOTEMPTY, but we expect it to raise Errno::EACCES.
```
$ mkdir foo
$ touch foo/bar
$ chmod 555 foo
$ ruby -rfileutils -e 'FileUtils.rm_rf("foo")'
```
This changeset narrows the ensure region so that it rescues only
"failure to get children".
ec5d3b84ea
2022-08-23 16:52:40 +09:00
David Rodríguez
70f69f8539
[ruby/fileutils] Fix mkdir_p hanging on Windows when trying to create a file on a offline drive
...
9cc6a082d7
2022-08-22 10:12:25 +09:00
Hiroshi SHIBATA
3725454161
Merge ruby/fileutils from 332025bc02
2022-07-29 19:10:10 +09:00
Burdette Lamar
59273ff6e2
[ruby/fileutils] [DOC] Changes to examples ( https://github.com/ruby/fileutils/pull/96 )
...
* Changes to examples
346a71b2cb
2022-06-29 00:39:59 +09:00
Burdette Lamar
fdd1102550
[ruby/fileutils] Clarify difference between cp_r and install ( https://github.com/ruby/fileutils/pull/95 )
...
94a599e69f
2022-06-22 02:23:10 +09:00
Burdette Lamar
2e81fd764b
[ruby/fileutils] Correct method references for secure removal ( https://github.com/ruby/fileutils/pull/93 )
...
42c9685826
2022-06-21 23:16:24 +09:00
Burdette Lamar
1002998c6d
[ruby/fileutils] [DOC] Adding 'Related' ( https://github.com/ruby/fileutils/pull/92 )
...
fc3cc28397
2022-06-21 22:42:39 +09:00
Burdette Lamar
9327b6f222
[ruby/fileutils] [DOC] Revisions for module-level doc ( https://github.com/ruby/fileutils/pull/90 )
...
* Revisions for module-level doc
dcbad90a1f
2022-06-17 22:36:26 +09:00
Burdette Lamar
0ab2bca11c
[ruby/fileutils] [DOC] Small tweaks ( https://github.com/ruby/fileutils/pull/89 )
...
13ab96439b
2022-06-16 23:56:37 +09:00
Burdette Lamar
1e8fed2d2a
[ruby/fileutils] [DOC] More on paths and lists ( https://github.com/ruby/fileutils/pull/88 )
...
ba3ae2430d
2022-06-16 05:56:39 +09:00
Burdette Lamar
788a5e14fa
[ruby/fileutils] [DOC] More on cp_r ( https://github.com/ruby/fileutils/pull/87 )
...
* More on cp_r
82a2b62578
2022-06-15 05:42:26 +09:00
Burdette Lamar
9b9cc8ad34
[ruby/fileutils] [DOC] More on paths and lists ( https://github.com/ruby/fileutils/pull/86 )
...
* More on paths and lists
c3d92d34f4
2022-06-14 22:52:22 +09:00
Burdette Lamar
9a381c240c
[ruby/fileutils] [DOC] Clarify path arguments ( https://github.com/ruby/fileutils/pull/85 )
...
5f9ef9ddc8
2022-06-14 00:39:44 +09:00
Burdette Lamar
753da6deca
[ruby/fileutils] [DOC] Enhanced Rdoc ( https://github.com/ruby/fileutils/pull/84 )
...
Treats:
::chown_R
::touch
::commands
::options
::have_option?
::options_of
::collect_method
5df0324f52
2022-06-13 21:11:45 +09:00
Burdette Lamar
44b3daa0d7
[ruby/fileutils] Enhanced RDoc ( https://github.com/ruby/fileutils/pull/83 )
...
Treats ::chmod_R and ::chown.
df4ac84bef
2022-06-11 06:41:27 +09:00
Burdette Lamar
c2468fd88b
[ruby/fileutils] Enhanced RDoc ( https://github.com/ruby/fileutils/pull/82 )
...
Treats ::chmod; adds Pathname usage to ::install.
9db4cb129c
2022-06-10 05:03:33 +09:00
Burdette Lamar
9b7208fca1
[ruby/fileutils] [DOC] Enhanced RDoc ( https://github.com/ruby/fileutils/pull/81 )
...
b9d5a79e38
2022-06-09 05:38:09 +09:00
Burdette Lamar
a07acbe417
[ruby/fileutils] File trees ( https://github.com/ruby/fileutils/pull/80 )
...
Adds a note about file tree examples.
65ac65067a
2022-06-08 21:35:00 +09:00
Burdette Lamar
b737998d25
[ruby/fileutils] [DOC] Enhanced RDoc for FileUtils ( https://github.com/ruby/fileutils/pull/78 )
...
Treats:
::rm
::rm_f
::rm_r
::rm_rf
::remove_entry_secure
ce2a438d75
2022-06-07 00:37:31 +09:00
Burdette Lamar
c50c9d4051
[ruby/fileutils] [DOC] Enhanced RDoc ( https://github.com/ruby/fileutils/pull/77 )
...
Treats:
::copy_entry
::copy_file
::copy_stream
::mv
d6d7e5330d
2022-05-31 02:30:07 +09:00
Burdette Lamar
012eb9b70d
[ruby/fileutils] [DOC] Enhanced RDoc for copy_entry ( https://github.com/ruby/fileutils/pull/76 )
...
27a3c376c7
2022-05-26 07:08:26 +09:00
Burdette Lamar
ae09fffbff
[ruby/fileutils] [DOC] Enhanced RDoc for ::cp_r ( https://github.com/ruby/fileutils/pull/75 )
...
a4da433443
2022-05-25 00:38:14 +09:00
Burdette Lamar
9c9c217045
[ruby/fileutils] [DOC] Enhanced RDoc for ::cp ( https://github.com/ruby/fileutils/pull/74 )
...
956b345ceb
2022-05-24 07:57:52 +09:00
Burdette Lamar
08b2f22c27
[ruby/fileutils] Enhanced RDoc for ::ln_sf and ::link_entry ( https://github.com/ruby/fileutils/pull/73 )
...
ff49055f8a
2022-05-24 01:17:11 +09:00
Burdette Lamar
479884d596
[ruby/fileutils] [DOC] Enhanced RDoc for ::ln_s ( https://github.com/ruby/fileutils/pull/72 )
...
db612c5e22
2022-05-23 22:00:33 +09:00
Burdette Lamar
aef36bb933
[ruby/fileutils] Enhanced RDoc for #cp_lr ( https://github.com/ruby/fileutils/pull/71 )
...
39772bccca
2022-05-21 08:55:57 +09:00