キーワード
- cd (24)
- chdir (24)
- chmod (12)
-
chmod
_ R (12) - chown (12)
-
chown
_ R (12) - copy (12)
- cp (12)
-
cp
_ lr (7) -
cp
_ r (12) - install (12)
- lambda (13)
- link (12)
- ln (12)
-
ln
_ s (12) -
ln
_ sf (12) - makedirs (12)
- mkdir (12)
-
mkdir
_ p (12) - mkpath (12)
- move (12)
- mv (12)
- proc (14)
- remove (12)
- rm (12)
-
rm
_ f (12) -
rm
_ r (12) -
rm
_ rf (12) - rmdir (12)
- rmtree (12)
-
safe
_ unlink (12) -
start
_ service (12) - symlink (12)
- touch (12)
- warn (12)
検索結果
先頭5件
-
FileUtils
. # cp _ lr(src , dest , noop: nil , verbose: nil , dereference _ root: true , remove _ destination: false) (114.0) -
src へのハードリンク dest を作成します。 src がディレクトリの場合、再帰的にリンクします。 dest がディレクトリの場合、src へのハードリンク dest/src を作成します。
...定する場合は配列で指定します。
@param dest リンク作成先のファイルかディレクトリです。
@param options :noop, :verbose, :dereference_root, :remove_destination が指定できます。
c:FileUtils#options
@raise ArgumentError dest が src に含ま......ileutils'
FileUtils.cp_lr %w(mail.rb field.rb debug/), site_ruby + '/tmail'
FileUtils.cp_lr Dir.glob('*.rb'), '/home/aamine/lib/ruby', noop: true, verbose: true
//}
//emlist[内容をリンクする例][ruby]{
require 'fileutils'
# ディレクトリそのものではなく、ディレクトリの... -
Kernel
. # warn(*message) -> nil (35.0) -
message を 標準エラー出力 $stderr に出力します。 $VERBOSE フラグ が nil のときは何も出力しません。
...message を 標準エラー出力 $stderr に出力します。 $VERBOSE
フラグ が nil のときは何も出力しません。
文字列以外のオブジェクトが引数として与えられた場合には、
to_s メソッドにより文字列に変換してから出力します。
この......メソッドは以下と同じです。
//emlist[][ruby]{
$stderr.puts(*message) if !$VERBOSE.nil? && !message.empty?
nil
//}
@param message 出力するオブジェクトを任意個指定します。
@raise IOError 標準エラー出力が書き込み用にオープンされていなければ発......生します。
@raise Errno::EXXX 出力に失敗した場合に発生します。
//emlist[例][ruby]{
warn "caution!" #=> caution!
$VERBOSE = nil
warn "caution!" # 何もしない
//}
@see $stderr,$VERBOSE......生します。
@raise Errno::EXXX 出力に失敗した場合に発生します。
//emlist[例][ruby]{
warn "caution!" #=> caution!
$VERBOSE = nil
warn "caution!" # 何もしない
//}
@see Warning#warn, $stderr,$VERBOSE... -
Kernel
. # warn(*message , uplevel: nil) -> nil (35.0) -
message を 標準エラー出力 $stderr に出力します。 $VERBOSE フラグ が nil のときは何も出力しません。
...message を 標準エラー出力 $stderr に出力します。 $VERBOSE
フラグ が nil のときは何も出力しません。
文字列以外のオブジェクトが引数として与えられた場合には、
to_s メソッドにより文字列に変換してから出力します。
upleve......l を指定しない場合は、
このメソッドは以下と同じです。
//emlist[][ruby]{
$stderr.puts(*message) if !$VERBOSE.nil? && !message.empty?
nil
//}
@param message 出力するオブジェクトを任意個指定します。
@param uplevel いくつ前の呼び出し元のファイ......れば発生します。
@raise Errno::EXXX 出力に失敗した場合に発生します。
//emlist[例][ruby]{
warn "caution!" #=> caution!
$VERBOSE = nil
warn "caution!" # 何もしない
//}
//emlist[uplevel の例][ruby]{
def foo
warn("test message", uplevel: 0) # => test.rb:2: warning: te... -
Kernel
. # warn(*message , uplevel: nil , category: nil) -> nil (35.0) -
message を 標準エラー出力 $stderr に出力します。 $VERBOSE フラグ が nil のときは何も出力しません。
...message を 標準エラー出力 $stderr に出力します。 $VERBOSE
フラグ が nil のときは何も出力しません。
文字列以外のオブジェクトが引数として与えられた場合には、
to_s メソッドにより文字列に変換してから出力します。
upleve......l を指定しない場合は、
このメソッドは以下と同じです。
//emlist[][ruby]{
$stderr.puts(*message) if !$VERBOSE.nil? && !message.empty?
nil
//}
@param message 出力するオブジェクトを任意個指定します。
@param uplevel いくつ前の呼び出し元のファイ......れば発生します。
@raise Errno::EXXX 出力に失敗した場合に発生します。
//emlist[例][ruby]{
warn "caution!" #=> caution!
$VERBOSE = nil
warn "caution!" # 何もしない
//}
//emlist[uplevel の例][ruby]{
def foo
warn("test message", uplevel: 0) # => test.rb:2: warning: te... -
FileUtils
. # chmod(mode , list , options = {}) -> Array (19.0) -
ファイル list のパーミッションを mode に変更します。
...場合は文字列でも指定可能です。
二つ以上指定する場合は配列で指定します。
@param options :noop と :verbose が指定可能です。
c:FileUtils#options
@return list を配列として返します。
//emlist[][ruby]{
# Absolute mode
requ......d')
FileUtils.chmod(0755, '/usr/bin/ruby', verbose: true)
# Symbolic mode
require 'fileutils'
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 (19.0) -
list 以下のファイルの所有ユーザと所有グループを user と group へ再帰的に変更します。
...ions :noop と :verbose が指定可能です。
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', '/var/www/htdocs'
FileUtils.chown_R 'cvs', 'cvs', '/var/cvs', verbose: true
//}... -
FileUtils
. # install(src , dest , options = {}) -> () (19.0) -
src と dest の内容が違うときだけ src を dest にコピーします。
...m options :preserve, :noop, :verbose, :mode が指定できます。
c:FileUtils#options
//emlist[][ruby]{
require 'fileutils'
FileUtils.install('ruby', '/usr/local/bin/ruby', mode: 0755, verbose: true)
FileUtils.install('lib.rb', '/usr/local/lib/ruby/site_ruby', verbose: true)
//}......rve, :noop, :verbose, :mode, :owner, :group が指定できます。
c:FileUtils#options
//emlist[][ruby]{
require 'fileutils'
FileUtils.install('ruby', '/usr/local/bin/ruby', mode: 0755, verbose: true)
FileUtils.install('lib.rb', '/usr/local/lib/ruby/site_ruby', verbose: true)
//}... -
DRb
. # start _ service(uri=nil , front=nil , config _ or _ acl=nil) -> () (13.0) -
dRuby のサービス(サーバ)を起動します。
...別子とオブジェクトを相互に変換するためのオブジェクト。
デフォルトは DRb::DRbIdConv のインスタンス。
: :verbose
真を指定すると失敗したdRuby経由のメソッドのログを
$stdout に出力します。デフォルトは false。
: :tcp_acl......fault_argc_limit
* DRb::DRbServer.default_id_conv
* DRb::DRbServer.default_load_limit
* DRb::DRbServer.default_safe_level
* DRb::DRbServer.verbose=
config に Hash以外を渡すと、ACL(Access Control List)として取り扱われます。
起動したサーバはただちに接続を待... -
FileUtils
. # cd(dir , options = {}) -> 0 (13.0) -
プロセスのカレントディレクトリを dir に変更します。
...ック終了後に
元のディレクトリに戻ります。
@param dir ディレクトリを指定します。
@param options :verbose が指定できます。
c:FileUtils#options
//emlist[][ruby]{
require 'fileutils'
FileUtils.cd('/', verbose: true) # chdir and report it
//}... -
FileUtils
. # cd(dir , options = {}) -> nil (13.0) -
プロセスのカレントディレクトリを dir に変更します。
...ック終了後に
元のディレクトリに戻ります。
@param dir ディレクトリを指定します。
@param options :verbose が指定できます。
c:FileUtils#options
//emlist[][ruby]{
require 'fileutils'
FileUtils.cd('/', verbose: true) # chdir and report it
//}... -
FileUtils
. # cd(dir , options = {}) {|dir| . . . . } -> nil (13.0) -
プロセスのカレントディレクトリを dir に変更します。
...ック終了後に
元のディレクトリに戻ります。
@param dir ディレクトリを指定します。
@param options :verbose が指定できます。
c:FileUtils#options
//emlist[][ruby]{
require 'fileutils'
FileUtils.cd('/', verbose: true) # chdir and report it
//}... -
FileUtils
. # cd(dir , options = {}) {|dir| . . . . } -> object (13.0) -
プロセスのカレントディレクトリを dir に変更します。
...ック終了後に
元のディレクトリに戻ります。
@param dir ディレクトリを指定します。
@param options :verbose が指定できます。
c:FileUtils#options
//emlist[][ruby]{
require 'fileutils'
FileUtils.cd('/', verbose: true) # chdir and report it
//}... -
FileUtils
. # chdir(dir , options = {}) -> 0 (13.0) -
プロセスのカレントディレクトリを dir に変更します。
...ック終了後に
元のディレクトリに戻ります。
@param dir ディレクトリを指定します。
@param options :verbose が指定できます。
c:FileUtils#options
//emlist[][ruby]{
require 'fileutils'
FileUtils.cd('/', verbose: true) # chdir and report it
//}... -
FileUtils
. # chdir(dir , options = {}) -> nil (13.0) -
プロセスのカレントディレクトリを dir に変更します。
...ック終了後に
元のディレクトリに戻ります。
@param dir ディレクトリを指定します。
@param options :verbose が指定できます。
c:FileUtils#options
//emlist[][ruby]{
require 'fileutils'
FileUtils.cd('/', verbose: true) # chdir and report it
//}...