968件ヒット
[1-100件を表示]
(0.027秒)
クラス
- Dir (33)
-
File
:: Stat (11)
モジュール
- FileTest (33)
- FileUtils (633)
- Kernel (22)
- RakeFileUtils (77)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - DryRun (11)
- FileOperations (11)
- FileUtils (11)
- METHODS (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 3
. 1 . 0 (3) - NoWrite (11)
-
OPT
_ TABLE (11) - RakeFileUtils (11)
- Verbose (11)
- cd (22)
- chdir (22)
- chmod (11)
-
chmod
_ R (11) - chown (11)
-
chown
_ R (11) - cmp (11)
-
collect
_ method (11) - commands (11)
-
compare
_ file (11) -
compare
_ stream (11) - copy (11)
-
copy
_ entry (11) -
copy
_ file (11) -
copy
_ stream (11) - cp (11)
-
cp
_ lr (6) -
cp
_ r (11) - getwd (11)
-
have
_ option? (11) - identical? (11)
- install (11)
- link (11)
- ln (11)
-
ln
_ s (11) -
ln
_ sf (11) - makedirs (11)
- mkdir (22)
-
mkdir
_ p (11) - mkpath (11)
- mktmpdir (22)
- move (11)
- mv (11)
- nowrite (11)
-
nowrite
_ flag (11) -
nowrite
_ flag= (11) - pwd (11)
- remove (11)
-
remove
_ dir (11) -
remove
_ entry (11) -
remove
_ entry _ secure (11) -
remove
_ file (11) - rm (11)
-
rm
_ f (22) -
rm
_ r (11) -
rm
_ rf (22) - rmdir (11)
- rmtree (11)
- ruby (11)
-
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 8 . 3 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) -
safe
_ ln (11) -
safe
_ unlink (11) - setgid? (11)
- setuid? (11)
- sh (11)
-
split
_ all (11) - sticky? (11)
- symlink (11)
- symlink? (11)
- touch (11)
- uptodate? (11)
- verbose (11)
-
verbose
_ flag (11) -
verbose
_ flag= (11) -
when
_ writing (11)
検索結果
先頭5件
-
fileutils (44000.0)
-
再帰的な削除などの基本的なファイル操作を行うためのライブラリです。
再帰的な削除などの基本的なファイル操作を行うためのライブラリです。 -
FileUtils
. # copy _ file(src , dest , preserve = false , dereference _ root = true) -> () (26101.0) -
ファイル src の内容を dest にコピーします。
ファイル src の内容を dest にコピーします。
@param src コピー元。
@param dest コピー先。
@param preserve preserve が真のときは更新時刻と、
可能なら所有ユーザ・所有グループもコピーします。
@param dereference_root dereference_root が真のときは src についてだけシンボリックリンクの指す
内容をコピーします。偽の場合はシンボリックリンク自体をコピーします。 -
FileUtils
. # remove _ file(path , force = false) -> () (26101.0) -
ファイル path を削除します。
ファイル path を削除します。
@param path 削除するファイル。
@param force 真のときは削除中に発生した StandardError を無視します。 -
FileUtils
. # compare _ file(file _ a , file _ b) -> bool (23369.0) -
ファイル file_a と file_b の内容が同じなら真を返します。
...ファイル file_a と file_b の内容が同じなら真を返します。
@param file_a ファイル名。
@param file_b ファイル名。
//emlist[][ruby]{
require 'fileutils'
FileUtils.cmp('somefile', 'somefile') #=> true
FileUtils.cmp('/dev/null', '/dev/urandom') #=> false
//}... -
FileUtils
. # cmp(file _ a , file _ b) -> bool (20269.0) -
ファイル file_a と file_b の内容が同じなら真を返します。
...ファイル file_a と file_b の内容が同じなら真を返します。
@param file_a ファイル名。
@param file_b ファイル名。
//emlist[][ruby]{
require 'fileutils'
FileUtils.cmp('somefile', 'somefile') #=> true
FileUtils.cmp('/dev/null', '/dev/urandom') #=> false
//}... -
FileUtils
. # identical?(file _ a , file _ b) -> bool (20269.0) -
ファイル file_a と file_b の内容が同じなら真を返します。
...ファイル file_a と file_b の内容が同じなら真を返します。
@param file_a ファイル名。
@param file_b ファイル名。
//emlist[][ruby]{
require 'fileutils'
FileUtils.cmp('somefile', 'somefile') #=> true
FileUtils.cmp('/dev/null', '/dev/urandom') #=> false
//}... -
FileUtils
. # copy(src , dest , options = {}) -> () (20066.0) -
ファイル src を dest にコピーします。
...書きします。
src にファイルが複数与えられた場合、
file1 を dest/file1 にコピー、file2 を dest/file2 にコピー、
というように、ディレクトリ dest の中にファイル file1、file2、 …を
同じ名前でコピーします。dest がディレクトリ......c:FileUtils#options
@raise Errno::ENOTDIR src が複数のファイルかつ、dest がディレクトリでない場合に発生します。
//emlist[][ruby]{
require 'fileutils'
FileUtils.cp 'eval.c', 'eval.c.org'
FileUtils.cp(['cgi.rb', 'complex.rb', 'date.rb'], '/usr/lib/ruby/1.8')
FileUtils.c... -
FileUtils
. # cp(src , dest , options = {}) -> () (20066.0) -
ファイル src を dest にコピーします。
...書きします。
src にファイルが複数与えられた場合、
file1 を dest/file1 にコピー、file2 を dest/file2 にコピー、
というように、ディレクトリ dest の中にファイル file1、file2、 …を
同じ名前でコピーします。dest がディレクトリ......c:FileUtils#options
@raise Errno::ENOTDIR src が複数のファイルかつ、dest がディレクトリでない場合に発生します。
//emlist[][ruby]{
require 'fileutils'
FileUtils.cp 'eval.c', 'eval.c.org'
FileUtils.cp(['cgi.rb', 'complex.rb', 'date.rb'], '/usr/lib/ruby/1.8')
FileUtils.c... -
FileUtils
. # cp _ lr(src , dest , noop: nil , verbose: nil , dereference _ root: true , remove _ destination: false) (20060.0) -
src へのハードリンク dest を作成します。 src がディレクトリの場合、再帰的にリンクします。 dest がディレクトリの場合、src へのハードリンク dest/src を作成します。
...かディレクトリです。
@param options :noop, :verbose, :dereference_root, :remove_destination が指定できます。
c:FileUtils#options
@raise ArgumentError dest が src に含まれる場合に発生します。
@raise Errno::EEXIST src が一つで dest がすでに存......re 'fileutils'
FileUtils.rm_r site_ruby + '/mylib', force: true
FileUtils.cp_lr 'lib/', site_ruby + '/mylib'
//}
//emlist[様々なファイルを対象ディレクトリにリンクする例][ruby]{
require 'fileutils'
FileUtils.cp_lr %w(mail.rb field.rb debug/), site_ruby + '/tmail'
FileUtils.cp_......する例][ruby]{
require 'fileutils'
# ディレクトリそのものではなく、ディレクトリの内容をリンクしたい場合は、
# 以下のようになります。(たとえば src/x -> dest/x, src/y -> dest/y)
FileUtils.cp_lr 'src/.', 'dest'
# FileUtils.cp_lr('src', 'dest') は de... -
FileUtils
. # chmod(mode , list , options = {}) -> Array (20054.0) -
ファイル list のパーミッションを mode に変更します。
...c:FileUtils#options
@return list を配列として返します。
//emlist[][ruby]{
# Absolute mode
require 'fileutils'
FileUtils.chmod(0644, %w(my.rb your.rb his.rb her.rb))
FileUtils.chmod(0755, 'somecommand')
FileUtils.chmod(0755, '/usr/bin/ruby', verbose: true)
# Symbolic mode
require 'fileut......ils'
FileUtils.chmod("u=wr,go=rr", %w(my.rb your.rb his.rb her.rb))
FileUtils.chmod("u=wrx,go=rx", 'somecommand')
FileUtils.chmod("u=wrx,go=rx", '/usr/bin/ruby', verbose: true)
//}
symbolic mode では以下の指定を 操作対象 演算子 権限 の順番で指定します。
操作対象(複...