545件ヒット
[1-100件を表示]
(0.050秒)
キーワード
- cd (22)
- chdir (22)
- chmod (11)
-
chmod
_ R (11) - chown (11)
-
chown
_ R (11) - cmp (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)
- identical? (11)
- install (11)
- link (11)
- ln (11)
-
ln
_ s (11) -
ln
_ sf (11) - makedirs (11)
- mkdir (11)
-
mkdir
_ p (11) - mkpath (11)
- move (11)
- mv (11)
- pwd (11)
- remove (11)
-
remove
_ dir (11) -
remove
_ entry (11) -
remove
_ entry _ secure (11) -
remove
_ file (11) - rm (11)
-
rm
_ f (11) -
rm
_ r (11) -
rm
_ rf (11) - rmdir (11)
- rmtree (11)
-
safe
_ unlink (11) - setgid? (11)
- setuid? (11)
- sticky? (11)
- symlink (11)
- touch (11)
- uptodate? (11)
検索結果
先頭5件
-
FileUtils
. # copy _ file(src , dest , preserve = false , dereference _ root = true) -> () (30102.0) -
ファイル src の内容を dest にコピーします。
ファイル src の内容を dest にコピーします。
@param src コピー元。
@param dest コピー先。
@param preserve preserve が真のときは更新時刻と、
可能なら所有ユーザ・所有グループもコピーします。
@param dereference_root dereference_root が真のときは src についてだけシンボリックリンクの指す
内容をコピーします。偽の場合はシンボリックリンク自体をコピーします。 -
FileUtils
. # remove _ file(path , force = false) -> () (30102.0) -
ファイル path を削除します。
ファイル path を削除します。
@param path 削除するファイル。
@param force 真のときは削除中に発生した StandardError を無視します。 -
FileUtils
. # compare _ file(file _ a , file _ b) -> bool (27370.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 (24270.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 (24270.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 = {}) -> () (24067.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 = {}) -> () (24067.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) (24061.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 (24055.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 では以下の指定を 操作対象 演算子 権限 の順番で指定します。
操作対象(複... -
FileUtils
. # chown _ R(user , group , list , options = {}) -> Array (24043.0) -
list 以下のファイルの所有ユーザと所有グループを user と group へ再帰的に変更します。
...。
c:FileUtils#options
@return list を配列として返します。
//emlist[][ruby]{
require 'fileutils'
FileUtils.chown 'root', 'staff', '/usr/local/bin/ruby'
FileUtils.chown nil, 'bin', Dir.glob('/usr/bin/*'), verbose: true
require 'fileutils'
FileUtils.chown_R 'www', 'www',...