Commit graph

66 commits

Author SHA1 Message Date
knu
77b7f4b4c3 * lib/fileutils.rb (FileUtils#touch): Fix corrupted output.
ref [ruby-dev:43401]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@31575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15 12:41:05 +00:00
shyouhei
452c5aff0f merge revision(s) 30896:
* lib/fileutils.rb (FileUtils::remove_entry_secure): there is a
	  race condition in the case where the given path is a directory,
	  and some other user can move that directory, and create a
	  symlink while this method is executing.
	  Reported by: Nicholas Jefferson <nicholas at pythonic.com.au>


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@30905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-18 11:48:02 +00:00
knu
af06085550 * lib/fileutils.rb (FileUtils#rmdir): Backport -p (parents). This
fixes "make clean".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@28436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-25 15:05:14 +00:00
shyouhei
e23e534ae5 * lib/fileutils.rb (FileUtils::cp_r): dup needed here; options are
destroyed otherwise.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@27400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-19 10:46:48 +00:00
nobu
75c1cac7f3 * {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@27366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-16 21:51:01 +00:00
knu
bd1990bfd9 * lib/fileutils.rb (FileUtils#fu_get_uid, fu_get_gid): Do not
convert an integer back and forth.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-22 08:59:07 +00:00
matz
5a7a9d0d8f * lib/fileutils.rb (FileUtils#fu_get_gid): stringify group
argument before making regexp match.  [ruby-dev:38155]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@22937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-13 16:13:40 +00:00
nobu
b080500cbf * lib/fileutils.rb (mv): added description for the case of
different partitions.  [ruby-talk:329072]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@22567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23 05:47:06 +00:00
nobu
a30657e815 * file.c (rb_stat_s_utime): fixed a commit miss for the platforms
where utimes() does not exist.

* lib/fileutils.rb (touch): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-04 14:38:02 +00:00
aamine
19ac7bdafc * lib/fileutils.rb (mv): could not move a directory between different filesystems. [ruby-dev:30411]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-03 14:01:31 +00:00
aamine
2c8761820f * lib/fileutils.rb (touch): last commit causes error if :mtime option was not given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-03 13:57:31 +00:00
nobu
566b460705 * file.c (rb_file_s_utime): allow nil to set the current time.
* lib/fileutils.rb (touch): ditto, and added :mtime and :nocreate
  options.  fixed: [ruby-talk:219037]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-03 13:37:02 +00:00
aamine
ba70d00204 * lib/fileutils.rb (FileUtils.cp_r): dereference_root=true is default in Ruby 1.8. This line is wrongly removed in last commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-13 13:34:09 +00:00
aamine
e08c820f55 * lib/fileutils.rb: backport from HEAD (rev 1.71).
* lib/fileutils.rb (FileUtils.cp_r): new option :remove_destination.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-18 16:28:50 +00:00
matz
c26dff9396 * lib/fileutils.rb (FileUtils::fu_world_writable): make it
private.  [ruby-core:07383]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-18 03:23:16 +00:00
aamine
52c0bca7fb * lib/fileutils.rb (mv): should remove file after copying. [ruby-dev:28223]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-01-19 13:22:13 +00:00
ocean
9958d9509f * lib/fileutils.rb (FileUtils::ln): ln documentation fix.
[ruby-core:06661]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-20 01:23:41 +00:00
aamine
db721ea999 * lib/fileutils.rb (cd): no longer accept :noop option, related code is useless (backported from trunk, rev 1.67). [ruby-core:05858] [ruby-Bugs:2494]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-23 23:56:42 +00:00
aamine
6e77ae4c13 * lib/fileutils.rb: fix visibility of FileUtils::NoWrite, Verbose, DryRun (backported from trunk, rev 1.66). [ruby-core:05954]
* test/fileutils/test_nowrite.rb: test it.
* test/fileutils/test_dryrun.rb: new file.
* test/fileutils/test_verbose.rb: new file.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-23 23:39:01 +00:00
aamine
524ad518b6 * lib/fileutils.rb (cp_r): default is :dereference_root=>true for backward compatibility. [ruby-dev:27145]
* test/fileutils/test_fileutils.rb (test_cp_r): test it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-19 01:37:28 +00:00
aamine
b6c5814f2c * lib/fileutils.rb: backported from trunk (rev 1.65):
* lib/fileutils.rb (rm_r): new option :secure.
* lib/fileutils.rb (rm_rf): new option :secure.
* lib/fileutils.rb: new method #remove_entry_secure.
* lib/fileutils.rb (cd): remove option :noop.
* lib/fileutils.rb (cp_r): new option :dereference_root.
* lib/fileutils.rb (cp_r): new option :dereference_root.
* lib/fileutils.rb: new method #remove_entry.
* lib/fileutils.rb: new method #chmod_R.
* lib/fileutils.rb: new method #chown.
* lib/fileutils.rb: new method #chown_R.
* lib/fileutils.rb: new method .commands.
* lib/fileutils.rb: new method .options.
* lib/fileutils.rb: new method .have_option?.
* lib/fileutils.rb: new method .options_of.
* lib/fileutils.rb: new method .collect_method.
* lib/fileutils.rb: use module_function instead of single extend.
* test/fileutils/test_fileutils.rb: backported from trunk (1.36).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-18 21:41:57 +00:00
aamine
f42db5e785 * lib/fileutils.rb (remove_file): ignore exceptions caused by chmod.
* lib/fileutils.rb (remove_dir): try to get rights to rmdir. [ruby-Bugs:1502] (2 items backportted from HEAD, rev 1.53-54)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-14 10:19:11 +00:00
matz
8cdd45d15b * ext/etc/etc.c (Init_etc): sGroup needs HAVE_ST_GR_PASSWD check.
[ruby-dev:25675]

* misc/ruby-mode.el: [ruby-core:04415]

* lib/rdoc/generators/html_generator.rb: [ruby-core:04412]

* lib/rdoc/generators/ri_generator.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-12 10:57:22 +00:00
aamine
8f1c58dda3 * lib/fileutils.rb (copy_entry): could not copy symbolic link. [ruby-talk:125733]
* lib/fileutils.rb (copy_stream): use read/write instead of sysread/syswrite.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-10 18:28:32 +00:00
aamine
225a5f5282 * lib/fileutils.rb (mv): should raise error when moving a directory to the (empty) directory. [ruby-talk:124368] (backport from HEAD 1.48)
* lib/fileutils.rb (mv): wrongly did not overwrite file on Win32 platforms. (backport from HEAD 1.48)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-27 06:22:14 +00:00
aamine
ae434c6035 * lib/fileutils.rb (mkdir, mkdir_p): should ensure directory permission. (backportted from HEAD, 1.47)
* lib/fileutils.rb (traverse, remove_dir): untaint trasted objects. (backportted from HEAD, 1.46)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-24 19:24:35 +00:00
aamine
4c28c7d1af * lib/fileutils.rb (mkdir_p): backport from CVS HEAD 1.45. [ruby-core:03420]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-17 11:21:42 +00:00
aamine
49e2c2e058 * lib/fileutils.rb: backport from CVS HEAD (rev1.44).
* lib/fileutils.rb: cp_r should copy symlink itself, except cp_r root.
* lib/fileutils.rb: new option mv :force.
* lib/fileutils.rb: new module FileUtils::DryRun.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-14 04:09:33 +00:00
aamine
6d84972bd5 * lib/fileutils.rb (fu_list): Array() breaks pathes including "\n". [ruby-core:02843]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-07 12:32:31 +00:00
aamine
4c99df4180 * lib/fileutils.rb (remove_dir): should handle symlink correctly. This patch is contributed by Christian Loew. [ruby-talk:94635] (Backport from main trunk)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-10 13:29:14 +00:00
aamine
232b4c2073 * lib/fileutils.rb (mkdir): remove trailing `/' from pathes.
* lib/fileutils.rb (rmdir): ditto. [ruby-dev:22238]
* lib/fileutils.rb (rmdir_r): ditto.
* lib/fileutils.rb (fu_copy_dir): check if it is a directory after mkdir(2).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-12 10:33:24 +00:00
aamine
d44d45450f * lib/fileutils.rb (mkdir_p): remove trailing `/' befere mkdir(2). mkdir("nonexistdir/") does not work on NetBSD/Alpha 1.6.1.
* lib/fileutils.rb (fu_list): call to_str for all arguments.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-11 11:54:50 +00:00
aamine
5c3abcd043 catch all SystemCallErrors.
* lib/fileutils.rb (mkdir_p): catch all SystemCallErrors (mkdir("C:\") causes EACCESS on Windows 2000/NTFS).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-11 10:54:17 +00:00
aamine
eb5a174119 * lib/fileutils.rb (mkdir_p): check if it is a directory after mkdir(2) instead of before mkdir(2), to avoid race condition. [ruby-talk:87730]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-11 10:15:54 +00:00
aamine
eec8dd6737 * lib/fileutils.rb: def m( arg ) -> def m(arg).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-11 09:49:47 +00:00
aamine
e5690fcd6d * lib/fileutils.rb (fu_each_src_dest0): call #to_str to allow Pathname for arguments. [ruby-core:01795]
* test/fileutils/test_fileutils.rb: does much strict test on "same" files detecting.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-01 05:18:46 +00:00
aamine
061f8361da * lib/fileutils.rb (have_st_ino?): djgpp has valid st_ino.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-22 04:10:32 +00:00
matz
6212cfb9c5 * gc.c (Init_stack): stack region is far smaller than usual if
pthread is used.

* marshal.c (w_extended): singleton methods should not be checked
  when dumping via marshal_dump() or _dump(). [ruby-talk:85909]

* file.c (getcwdofdrv): avoid using getcwd() directly, use
  my_getcwd() instead.

* merged NeXT, OpenStep, Rhapsody ports patch from Eric Sunshine
  <sunshine@sunshineco.com>.  [ruby-core:01596]

* marshal.c (w_object): LINK check earlier than anything else,
  i.e. do not dump TYPE_IVAR for already dumped objects.
  (ruby-bugs PR#1220)

* eval.c (rb_eval): call "inherited" only when a new class is
  generated; not on reopening.

* eval.c (eval): prepend error position in evaluating string to

* configure.in: revived NextStep, OpenStep, and Rhapsody ports which
  had become unbuildable; enhanced --enable-fat-binary option so that
  it accepts a list of desired architectures (rather than assuming a
  fixed list), or defaults to a platform-appropriate list if user does
  not provide an explicit list; made the default list of architectures
  for MAB (fat binary) more comprehensive; now uses -fno-common even
  when building the interpreter (in addition to using it for
  extensions), thus allowing the interpreter to be embedded into a
  plugin module of an external project (in addition to allowing
  embedding directly into an application); added checks for
  <netinet/in_systm.h> (needed by `socket' extension) and getcwd(); now
  ensures that -I/usr/local/include is employed when extensions'
  extconf.rb scripts invoke have_header() since extension checks on
  NextStep and OpenStep will fail without it if the desired resource
  resides in the /usr/local tree; fixed formatting of --help message.

* Makefile.in: $(LIBRUBY_A) rule now deletes the archive before
  invoking $(AR) since `ar' on Apple/NeXT can not "update" MAB archives
  (see configure's --enable-fat-binary option); added rule for new
  missing/getcwd.c.

* defines.h: fixed endian handling during MAB build (see configure's
  --enable-fat-binary option) to ensure that all portions of the
  project see the correct WORDS_BIGENDIAN value (some extension modules
  were getting the wrong endian setting); added missing constants
  GETPGRP_VOID, WNOHANG, WUNTRACED, X_OK, and type pid_t for NextStep
  and OpenStep; removed unnecessary and problematic HAVE_SYS_WAIT_H
  define in NeXT section.

* dir.c: do not allow NAMLEN() macro to trust dirent::d_namlen on
  NextStep since, on some installations, this value always resolves
  uselessly to zero.

* dln.c: added error reporting to NextStep extension loader since the
  previous behavior of failing silently was not useful; now ensures
  that NSLINKMODULE_OPTION_BINDNOW compatibility constant is defined
  for OpenStep and Rhapsody; no longer includes <mach-o/dyld.h> twice
  on Rhapsody since this header lacks multiple-include protection,
  which resulted in "redefinition" compilation errors.

* main.c: also create hard reference to objc_msgSend() on NeXT
  platforms (in addition to Apple platforms).

* lib/mkmf.rb: now exports XCFLAGS from configure script to extension
  makefiles so that extensions can be built MAB (see configure's
  --enable-fat-binary option); also utilize XCFLAGS in cc_command()
  (but not cpp_command() because MAB flags are incompatible with
  direct invocation of `cpp').

* ext/curses/extconf.rb: now additionally checks for presence of these
  curses functions which are not present on NextStep or Openstep:
  bkgd(), bkgdset(), color(), curs(), getbkgd(), init(), scrl(), set(),
  setscrreg(), wattroff(), wattron(), wattrset(), wbkgd(), wbkgdset(),
  wscrl(), wsetscrreg()

* ext/curses/curses.c: added appropriate #ifdef's for additional set of
  curses functions now checked by extconf.rb; fixed curses_bkgd() and
  window_bkgd() to correctly return boolean result rather than numeric
  result; fixed window_getbkgd() to correctly signal an error by
  returning nil rather than -1.

* ext/etc/etc.c: setup_passwd() and setup_group() now check for null
  pointers before invoking rb_tainted_str_new2() upon fields extracted
  from `struct passwd' and `struct group' since null pointers in some
  fields are common on NextStep/OpenStep (especially so for the
  `pw_comment' field) and rb_tainted_str_new2() throws an exception
  when it receives a null pointer.

* ext/pty/pty.c: include "util.h" for strdup()/ruby_strdup() for
  platforms such as NextStep and OpenStep which lack strdup().

* ext/socket/getaddrinfo.c: cast first argument of getservbyname(),
  gethostbyaddr(), and gethostbyname() from (const char*) to non-const
  (char*) for older platforms such as NextStep and OpenStep.

* ext/socket/socket.c: include "util.h" for strdup()/ruby_strdup() for
  platforms such as NextStep and OpenStep which lack strdup(); include
  <netinet/in_systm.h> if present for NextStep and OpenStep; cast first
  argument of gethostbyaddr() and getservbyname() from (const char*) to
  non-const (char*) for older platforms.

* ext/syslog/syslog.c: include "util.h" for strdup()/ruby_strdup() for
  platforms such as NextStep and OpenStep which lack strdup().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-22 04:00:03 +00:00
aamine
edb9ab1b15 * lib/fileutils.rb (have_st_ino?): emx (OS/2 with EMX) does not have st_ino (always 0). [ruby-dev:21972]
* lib/fileutils.rb (rename_cannot_overwrite_file?): emx does not allow overwriting files by rename(2).
* test/fileutils/test_fileutils.rb: windows? -> have_drive_letter?, have_file_perm?


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-20 10:16:27 +00:00
aamine
a74dd747e3 * lib/fileutils.rb (fu_same?): add djgpp and wince.
* lib/fileutils.rb (cannot_overwrite?): add wince.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-19 05:33:07 +00:00
usa
0a50ed6611 * lib/fileutils.rb (cannot_overwrite_file?, have_st_ino?): bccwin32
is same as mswin32.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-19 02:06:37 +00:00
aamine
6874cb465a * lib/fileutils.rb (fu_same?): temporal fix for windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-18 13:24:48 +00:00
aamine
1c0cee4f83 * lib/fileutils.rb (fu_same?): check by inode instead of path name, to detect two hard links pointing to the same content.
* test/fileutils.rb: did not create correctly looped symlinks.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-18 10:05:21 +00:00
aamine
2bfd5c1a3d * lib/fileutils.rb (fu_each_src_dest): raise if src==dest. [ruby-talk:85344] [ruby-core:01699]
* lib/fileutils.rb: use Object#is_a? instead of Class#=== to allow e.g. remote objects for receivers.
* lib/fileutils.rb: FileTest -> File.
* lib/fileutils.rb: put parentheses for arguments of File.xxxx?
* test/fileutils/test_fileutils.rb (test_cp): test "cp a a".
* test/fileutils/test_fileutils.rb (test_mv): test "mv a a".
* test/fileutils/test_fileutils.rb (test_ln): test "ln a a".
* test/fileutils/test_fileutils.rb (test_ln_s): test "ln_s a a".
* test/fileutils/test_fileutils.rb (test_install): test "install a a".
* test/fileutils/fileasserts.rb: new method assert_symlink.
* test/fileutils/fileasserts.rb: assert_is_directory -> assert_directory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-18 05:09:20 +00:00
matz
1a8ccefafc * io.c (READ_DATA_BUFFERED): new macro to detect whether stdio
buffer filled.

* io.c (rb_io_fptr_cleanup): move path deallocation to
  rb_io_fptr_finalize (finalizer called by GC).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-30 09:36:41 +00:00
eban
5e12815fb1 * lib/fileutils.rb (install): should preserve timestamp only.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-05 09:09:35 +00:00
eban
3fbbec0c39 * lib/fileutils.rb (install): support preserve timestamp.
* instruby.rb (install): use FileUtils::install preserve mode.

* lib/un.rb: new.  % ruby -run -e cp -- -p foo bar

* lib/mkmf.rb: use un.rb instead of ftools.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-29 10:24:28 +00:00
aamine
f701792f6f * lib/fileutils.rb: use hashes to pass options.
* lib/fileutils.rb: new option mkdir(:mode), mkdir_p(:mode).
* instruby.rb: follow fileutils.rb feature change.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-02 06:07:54 +00:00
aamine
cd74de7314 * lib/net/fileutils.rb: rm_r should raise Errno::ENOENT if file not exist. [ruby-core:958] Thanks Johan Holmberg.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-15 10:28:04 +00:00
eban
ced8bbee7c * lib/fileutils.rb (mkdir, mkdir_p): revert.
* instruby.rb (umask): umask 0022, not 0.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-09 10:39:50 +00:00