るりまサーチ

最速Rubyリファレンスマニュアル検索!
177件ヒット [1-100件を表示] (0.040秒)
トップページ > クエリ:File[x] > クエリ:mkdir[x]

別のキーワード

  1. _builtin file?
  2. _builtin file
  3. file mtime
  4. file path
  5. file atime

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 > >>

FileUtils.#mkdir(dir, options = {}) -> () (21119.0)

ディレクトリ dir を作成します。

...作成するディレクトリ。

@param options :mode, :noop, :verbose が指定できます。
c:FileUtils#options


//emlist[][ruby]{
require 'fileutils'
File
Utils.mkdir('test')
File
Utils.mkdir(%w( tmp data ))
File
Utils.mkdir('notexist', noop: true) # does not create really
//}...

Dir.mkdir(path, mode = 0777) -> 0 (18135.0)

path で指定された新しいディレクトリを作ります。パーミッションは mode で指定された値に umask をかけた値 (mode & ~umask) になります。 mkdir(2) も参照して下さい。 ディレクトリの作成に成功すれば 0 を返します。

...ディレクトリを作ります。パーミッションは
mode で指定された値に umask をかけた値 (mode & ~umask) になります。
mkdir
(2) も参照して下さい。
ディレクトリの作成に成功すれば 0 を返します。

@param path ディレクトリのパスを文...
...ドを整数で与えます。

@raise Errno::EXXX ディレクトリの作成に失敗した場合に発生します。

//emlist[例][ruby]{
p File.umask #=> 2
Dir.mkdir('t', 0666)
p "%#o" % (07777 & File.stat('t').mode) #=> "0664"
//}

@see FileUtils.#makedirs...

FileUtils.#mkdir_p(list, options = {}) -> Array (6107.0)

ディレクトリ dir とその親ディレクトリを全て作成します。

...ディレクトリ dir とその親ディレクトリを全て作成します。

例えば、
//emlist[][ruby]{
require 'fileutils'
File
Utils.mkdir_p('/usr/local/lib/ruby')
//}

は以下の全ディレクトリを (なければ) 作成します。

* /usr
* /usr/local
* /usr/local/bin
* /...
...。一つの場合は文字列でも指定できます。
二つ以上指定する場合は配列で指定します。

@param options :mode, :noop, :verbose が指定できます。
c:FileUtils#options

@return ディレクトリ名文字列の配列を返します。...

FileUtils.#makedirs(list, options = {}) -> Array (3007.0)

ディレクトリ dir とその親ディレクトリを全て作成します。

...ディレクトリ dir とその親ディレクトリを全て作成します。

例えば、
//emlist[][ruby]{
require 'fileutils'
File
Utils.mkdir_p('/usr/local/lib/ruby')
//}

は以下の全ディレクトリを (なければ) 作成します。

* /usr
* /usr/local
* /usr/local/bin
* /...
...。一つの場合は文字列でも指定できます。
二つ以上指定する場合は配列で指定します。

@param options :mode, :noop, :verbose が指定できます。
c:FileUtils#options

@return ディレクトリ名文字列の配列を返します。...

FileUtils.#mkpath(list, options = {}) -> Array (3007.0)

ディレクトリ dir とその親ディレクトリを全て作成します。

...ディレクトリ dir とその親ディレクトリを全て作成します。

例えば、
//emlist[][ruby]{
require 'fileutils'
File
Utils.mkdir_p('/usr/local/lib/ruby')
//}

は以下の全ディレクトリを (なければ) 作成します。

* /usr
* /usr/local
* /usr/local/bin
* /...
...。一つの場合は文字列でも指定できます。
二つ以上指定する場合は配列で指定します。

@param options :mode, :noop, :verbose が指定できます。
c:FileUtils#options

@return ディレクトリ名文字列の配列を返します。...

絞り込み条件を変える

FileUtils.#link(src, dest, options = {}) -> () (3006.0)

src へのハードリンク dest を作成します。

...c:FileUtils#options

@raise Errno::EEXIST src が一つで dest がすでに存在しディレクトリでない場合に発生します。
@raise Errno::ENOTDIR src が複数で dest がディレクトリでない場合に発生します。


//emlist[][ruby]{
require 'fileutils'
File
Utils.ln...
...('gcc', 'cc', verbose: true)
File
Utils.ln('/usr/bin/emacs21', '/usr/bin/emacs')
File
Utils.cd('/bin')
File
Utils.ln(%w(cp mv mkdir), '/usr/bin')
//}...

FileUtils.#ln(src, dest, options = {}) -> () (3006.0)

src へのハードリンク dest を作成します。

...c:FileUtils#options

@raise Errno::EEXIST src が一つで dest がすでに存在しディレクトリでない場合に発生します。
@raise Errno::ENOTDIR src が複数で dest がディレクトリでない場合に発生します。


//emlist[][ruby]{
require 'fileutils'
File
Utils.ln...
...('gcc', 'cc', verbose: true)
File
Utils.ln('/usr/bin/emacs21', '/usr/bin/emacs')
File
Utils.cd('/bin')
File
Utils.ln(%w(cp mv mkdir), '/usr/bin')
//}...

Shell#[](command, file1, file2 = nil) -> bool | Time | Integer | nil (222.0)

Kernel.#test や FileTest のメソッドに処理を委譲します。

...st や FileTest のメソッドに処理を委譲します。

@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。

@param file1 文...
...字列でファイルへのパスを指定します。

@param file2 文字列でファイルへのパスを指定します。

require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => tru...
...e
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true

@see Kernel.#test, FileTest...

Shell#test(command, file1, file2 = nil) -> bool | Time | Integer | nil (222.0)

Kernel.#test や FileTest のメソッドに処理を委譲します。

...st や FileTest のメソッドに処理を委譲します。

@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。

@param file1 文...
...字列でファイルへのパスを指定します。

@param file2 文字列でファイルへのパスを指定します。

require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => tru...
...e
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true

@see Kernel.#test, FileTest...

Shell::CommandProcessor#[](command, file1, file2 = nil) -> bool | Time | Integer | nil (222.0)

Kernel.#test や FileTest のメソッドに処理を委譲します。

...st や FileTest のメソッドに処理を委譲します。

@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。

@param file1 文...
...字列でファイルへのパスを指定します。

@param file2 文字列でファイルへのパスを指定します。

require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => tru...
...e
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true

@see Kernel.#test, FileTest...

絞り込み条件を変える

Shell::CommandProcessor#test(command, file1, file2 = nil) -> bool | Time | Integer | nil (222.0)

Kernel.#test や FileTest のメソッドに処理を委譲します。

...st や FileTest のメソッドに処理を委譲します。

@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。

@param file1 文...
...字列でファイルへのパスを指定します。

@param file2 文字列でファイルへのパスを指定します。

require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => tru...
...e
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true

@see Kernel.#test, FileTest...
<< 1 2 > >>