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:
parent
4dd2dd2f21
commit
5bd2b12dae
2 changed files with 12 additions and 18 deletions
|
@ -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>
|
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
|
* ext/tk/lib/tk.rb (_callback_entry_class?): add for checking whether
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#
|
#
|
||||||
# = fileutils.rb
|
# = 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.
|
# This program is free software.
|
||||||
# You can distribute/modify this program under the same terms of ruby.
|
# You can distribute/modify this program under the same terms of ruby.
|
||||||
|
@ -117,7 +117,6 @@ module FileUtils
|
||||||
|
|
||||||
alias chdir cd
|
alias chdir cd
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Options: (none)
|
# Options: (none)
|
||||||
#
|
#
|
||||||
|
@ -140,7 +139,6 @@ module FileUtils
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Options: mode noop verbose
|
# Options: mode noop verbose
|
||||||
#
|
#
|
||||||
|
@ -224,7 +222,6 @@ module FileUtils
|
||||||
end
|
end
|
||||||
private :fu_mkdir
|
private :fu_mkdir
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Options: noop, verbose
|
# Options: noop, verbose
|
||||||
#
|
#
|
||||||
|
@ -246,7 +243,6 @@ module FileUtils
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Options: force noop verbose
|
# Options: force noop verbose
|
||||||
#
|
#
|
||||||
|
@ -330,7 +326,6 @@ module FileUtils
|
||||||
ln_s src, dest, options
|
ln_s src, dest, options
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Options: preserve noop verbose
|
# Options: preserve noop verbose
|
||||||
#
|
#
|
||||||
|
@ -418,7 +413,8 @@ module FileUtils
|
||||||
# Both of +src+ and +dest+ must be a path name.
|
# Both of +src+ and +dest+ must be a path name.
|
||||||
# +src+ must exist, +dest+ must not exist.
|
# +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
|
# If +dereference+ is true, this method copies a target of symbolic link
|
||||||
# instead of a symbolic link itself.
|
# instead of a symbolic link itself.
|
||||||
#
|
#
|
||||||
|
@ -436,8 +432,8 @@ module FileUtils
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copies stream +src+ to +dest+.
|
# Copies stream +src+ to +dest+.
|
||||||
# +src+ must be respond to #read(n) and
|
# +src+ must respond to #read(n) and
|
||||||
# +dest+ must be respond to #write(str).
|
# +dest+ must respond to #write(str).
|
||||||
#
|
#
|
||||||
def copy_stream(src, dest)
|
def copy_stream(src, dest)
|
||||||
fu_copy_stream0 src, dest, fu_stream_blksize(src, dest)
|
fu_copy_stream0 src, dest, fu_stream_blksize(src, dest)
|
||||||
|
@ -450,7 +446,7 @@ module FileUtils
|
||||||
end
|
end
|
||||||
private :fu_copy_stream0
|
private :fu_copy_stream0
|
||||||
|
|
||||||
class CopyContext_
|
class CopyContext_ # :nodoc: internal use only
|
||||||
include ::FileUtils
|
include ::FileUtils
|
||||||
|
|
||||||
def initialize(preserve = false, dereference = false, stat = nil)
|
def initialize(preserve = false, dereference = false, stat = nil)
|
||||||
|
@ -623,7 +619,6 @@ module FileUtils
|
||||||
end
|
end
|
||||||
private :rename_cannot_overwrite_file?
|
private :rename_cannot_overwrite_file?
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Options: force noop verbose
|
# Options: force noop verbose
|
||||||
#
|
#
|
||||||
|
@ -720,7 +715,7 @@ module FileUtils
|
||||||
File.chmod 0777, fname
|
File.chmod 0777, fname
|
||||||
retry
|
retry
|
||||||
end
|
end
|
||||||
raise
|
raise unless force
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -743,7 +738,6 @@ module FileUtils
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Returns true if the contents of a file A and a file B are identical.
|
# Returns true if the contents of a file A and a file B are identical.
|
||||||
#
|
#
|
||||||
|
@ -780,7 +774,6 @@ module FileUtils
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Options: mode noop verbose
|
# Options: mode noop verbose
|
||||||
#
|
#
|
||||||
|
@ -806,7 +799,6 @@ module FileUtils
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Options: noop verbose
|
# Options: noop verbose
|
||||||
#
|
#
|
||||||
|
@ -825,7 +817,6 @@ module FileUtils
|
||||||
File.chmod mode, *list
|
File.chmod mode, *list
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Options: noop verbose
|
# Options: noop verbose
|
||||||
#
|
#
|
||||||
|
@ -848,7 +839,6 @@ module FileUtils
|
||||||
File.chown fu_get_uid(user), fu_get_gid(group), *list
|
File.chown fu_get_uid(user), fu_get_gid(group), *list
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Options: noop verbose
|
# Options: noop verbose
|
||||||
#
|
#
|
||||||
|
@ -912,7 +902,6 @@ module FileUtils
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Options: noop verbose
|
# Options: noop verbose
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue