1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/fileutils.rb (remove_file): ignore Errno::E* if force option is set. [ruby-dev:25944]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
aamine 2005-03-26 15:57:16 +00:00
parent 4dd2dd2f21
commit 5bd2b12dae
2 changed files with 12 additions and 18 deletions

View file

@ -1,3 +1,8 @@
Sun Mar 27 00:56:58 2005 Minero Aoki <aamine@loveruby.net>
* lib/fileutils.rb (remove_file): ignore Errno::E* if force option
is set. [ruby-dev:25944]
Sat Mar 26 22:51:33 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tk.rb (_callback_entry_class?): add for checking whether

View file

@ -1,7 +1,7 @@
#
# = fileutils.rb
#
# Copyright (C) 2000-2005 Minero Aoki <aamine@loveruby.net>
# Copyright (c) 2000-2005 Minero Aoki <aamine@loveruby.net>
#
# This program is free software.
# You can distribute/modify this program under the same terms of ruby.
@ -117,7 +117,6 @@ module FileUtils
alias chdir cd
#
# Options: (none)
#
@ -140,7 +139,6 @@ module FileUtils
true
end
#
# Options: mode noop verbose
#
@ -224,7 +222,6 @@ module FileUtils
end
private :fu_mkdir
#
# Options: noop, verbose
#
@ -246,7 +243,6 @@ module FileUtils
end
end
#
# Options: force noop verbose
#
@ -330,7 +326,6 @@ module FileUtils
ln_s src, dest, options
end
#
# Options: preserve noop verbose
#
@ -418,7 +413,8 @@ module FileUtils
# Both of +src+ and +dest+ must be a path name.
# +src+ must exist, +dest+ must not exist.
#
# If +preserve+ is true, this method preserves owner, group and permissions.
# If +preserve+ is true, this method preserves owner, group, permissions
# and modified time.
# If +dereference+ is true, this method copies a target of symbolic link
# instead of a symbolic link itself.
#
@ -436,8 +432,8 @@ module FileUtils
#
# Copies stream +src+ to +dest+.
# +src+ must be respond to #read(n) and
# +dest+ must be respond to #write(str).
# +src+ must respond to #read(n) and
# +dest+ must respond to #write(str).
#
def copy_stream(src, dest)
fu_copy_stream0 src, dest, fu_stream_blksize(src, dest)
@ -450,7 +446,7 @@ module FileUtils
end
private :fu_copy_stream0
class CopyContext_
class CopyContext_ # :nodoc: internal use only
include ::FileUtils
def initialize(preserve = false, dereference = false, stat = nil)
@ -623,7 +619,6 @@ module FileUtils
end
private :rename_cannot_overwrite_file?
#
# Options: force noop verbose
#
@ -720,7 +715,7 @@ module FileUtils
File.chmod 0777, fname
retry
end
raise
raise unless force
end
end
@ -743,7 +738,6 @@ module FileUtils
end
end
#
# Returns true if the contents of a file A and a file B are identical.
#
@ -780,7 +774,6 @@ module FileUtils
false
end
#
# Options: mode noop verbose
#
@ -806,7 +799,6 @@ module FileUtils
end
end
#
# Options: noop verbose
#
@ -825,7 +817,6 @@ module FileUtils
File.chmod mode, *list
end
#
# Options: noop verbose
#
@ -848,7 +839,6 @@ module FileUtils
File.chown fu_get_uid(user), fu_get_gid(group), *list
end
#
# Options: noop verbose
#
@ -912,7 +902,6 @@ module FileUtils
end
end
#
# Options: noop verbose
#