summaryrefslogtreecommitdiff
path: root/lib/fileutils.rb
AgeCommit message (Collapse)Author
2003-12-12* lib/fileutils.rb (mkdir): remove trailing `/' from pathes.aamine
* 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-11* lib/fileutils.rb (mkdir_p): remove trailing `/' befere mkdir(2). ↵aamine
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-11catch all SystemCallErrors.aamine
* 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* lib/fileutils.rb (mkdir_p): check if it is a directory after mkdir(2) ↵aamine
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* lib/fileutils.rb: def m( arg ) -> def m(arg).aamine
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-01* lib/fileutils.rb (fu_each_src_dest0): call #to_str to allow Pathname for ↵aamine
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-11-22* lib/fileutils.rb (have_st_ino?): djgpp has valid st_ino.aamine
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-22* gc.c (Init_stack): stack region is far smaller than usual ifmatz
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-20* lib/fileutils.rb (have_st_ino?): emx (OS/2 with EMX) does not have st_ino ↵aamine
(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-19* lib/fileutils.rb (fu_same?): add djgpp and wince.aamine
* 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* lib/fileutils.rb (cannot_overwrite_file?, have_st_ino?): bccwin32usa
is same as mswin32. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-18* lib/fileutils.rb (fu_same?): temporal fix for windows.aamine
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-18* lib/fileutils.rb (fu_same?): check by inode instead of path name, to ↵aamine
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* lib/fileutils.rb (fu_each_src_dest): raise if src==dest. [ruby-talk:85344] ↵aamine
[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-10-30* io.c (READ_DATA_BUFFERED): new macro to detect whether stdiomatz
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-08-05* lib/fileutils.rb (install): should preserve timestamp only.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-29* lib/fileutils.rb (install): support preserve timestamp.eban
* 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-05-02* lib/fileutils.rb: use hashes to pass options.aamine
* 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-04-15* lib/net/fileutils.rb: rm_r should raise Errno::ENOENT if file not exist. ↵aamine
[ruby-core:958] Thanks Johan Holmberg. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-09* lib/fileutils.rb (mkdir, mkdir_p): revert.eban
* 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* lib/fileutils.rb (mkdir, mkdir_p): set mode to 0755.eban
* Makefile.in (fake.rb): set ALT_SEPARATOR to the default value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-23* lib/fileutils (fu_stream_blksize): wrong logial condition.eban
(and -> or). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-21* lib/fileutils.rb: new method FileUtils#copy_stream.aamine
* lib/fileutils.rb: new method FileUtils#compare_file. * lib/fileutils.rb: new method FileUtils#compare_stream. * lib/fileutils.rb: new method FileUtils#rmtree (alias of rm_rf). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-10* lib/fileutils.rb (FileUtils#uptodate?): use mtime for comparison.aamine
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-08* lib/fileutils.rb: new method FileUtils.pwd (really).aamine
* lib/fileutils.rb: FileUtils.pwd, cmp, identical?, uptodate? does not accept any option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-06* lib/fileutils.rb: new method FileUtils.pwd.aamine
* lib/fileutils.rb: default label is ''. * lib/fileutils.rb: using module_eval again, to avoid ruby's bug. * lib/fileutils.rb: fix wrong examples in rdoc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-25*** empty log message ***nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-24Converted RD to RDoc and improved documentation. See comments at EOF.gsinclair
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-06* lib/fileutils.rb (ln): add ' -f' in the verbose message.eban
* lib/fileutils.rb (cp_r): add 'p' in the verbose message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-05* lib/fileutils.rb (ln): `argv' is not a argument.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-05* instruby.rb: need paren in regexp(make -n install).eban
* ext/extmk.rb (sysquote): do not need to quote on mswin/bccwin/mingw. * ext/extm.rb ($mflags): uniq items and remove '-' and '--'. move options to the lead. * lib/fileutils.rb (install): model on the real install command(message). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-29* lib/fileutils.rb: should not inherit ftools.rb's misfeature.aamine
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-28* lib/fileutils.rb (cmp): return false if file size differs.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-27* lib/fileutils.rb (fu_parseargs): reject illegal options correctly.aamine
* lib/fileutils.rb (uptodate?): parameter declaration was wrong. * lib/fileutils.rb: change coding styles. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-17* lib/fileutils.rb: stat.blksize might become 0/nil.aamine
* lib/fileutils.rb: change coding style. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-26* lib/fileutils.rb: new file.aamine
* lib/README: add fileutlis.rb. * doc/NEWS: add fileutils.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e