398件ヒット
[1-100件を表示]
(0.150秒)
ライブラリ
- ビルトイン (154)
- etc (11)
- fileutils (44)
- pathname (44)
- shell (30)
-
shell
/ command-processor (30) -
shell
/ filter (30) - tempfile (11)
クラス
- File (99)
-
File
:: Stat (33) - Pathname (44)
- Shell (30)
-
Shell
:: CommandProcessor (30) -
Shell
:: Filter (30) - Tempfile (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - Marshal フォーマット (11)
-
PC
_ FILESIZEBITS (11) - cleanpath (11)
- ftype (22)
- identical? (11)
- lchmod (11)
- lchown (11)
- ln (11)
- lstat (11)
-
make
_ link (11) -
make
_ symlink (11) - nlink (11)
- rdoc (11)
- readlink (40)
-
ruby 1
. 8 . 4 feature (11) -
safe
_ unlink (11) - symlink (40)
- symlink? (51)
- unlink (40)
検索結果
先頭5件
-
File
. link(old , new) -> 0 (33313.0) -
old を指す new という名前のハードリンクを 生成します。old はすでに存在している必要があります。 ハードリンクに成功した場合は 0 を返します。
...を指定します。
@param new ファイル名を表す文字列を指定します。
@raise Errno::EXXX 失敗した場合に発生します。
//emlist[例][ruby]{
IO.write("testfile", "test")
File.link("testfile", "testlink") # => 0
IO.read("testlink") # => "test"
//}... -
FileUtils
. # link(src , dest , options = {}) -> () (30301.0) -
src へのハードリンク dest を作成します。
...しディレクトリであるときは dest/src を作成します。
dest がすでに存在しディレクトリでないならば例外 Errno::EEXIST が発生します。
ただし :force オプションを指定したときは dest を上書きします。
src が複数の場合、
src[0] へ......外 Errno::ENOTDIR が発生します。
@param src リンク元。一つの場合は文字列でも指定可能です。
二つ以上指定する場合は配列で指定します。
@param dest リンク作成先のファイルかディレクトリです。
@param options :force, :noo......c:FileUtils#options
@raise Errno::EEXIST src が一つで dest がすでに存在しディレクトリでない場合に発生します。
@raise Errno::ENOTDIR src が複数で dest がディレクトリでない場合に発生します。
//emlist[][ruby]{
require 'fileutils'
FileUtils.ln(... -
Shell
# link(old , new) -> 0 (24329.0) -
File クラスにある同名のクラスメソッドと同じです.
...
File クラスにある同名のクラスメソッドと同じです.
@param old ファイル名を表す文字列を指定します。
@param new ファイル名を表す文字列を指定します。
@see File.link... -
Shell
:: CommandProcessor # link(old , new) -> 0 (24329.0) -
File クラスにある同名のクラスメソッドと同じです.
...
File クラスにある同名のクラスメソッドと同じです.
@param old ファイル名を表す文字列を指定します。
@param new ファイル名を表す文字列を指定します。
@see File.link... -
Shell
:: Filter # link(old , new) -> 0 (24329.0) -
File クラスにある同名のクラスメソッドと同じです.
...
File クラスにある同名のクラスメソッドと同じです.
@param old ファイル名を表す文字列を指定します。
@param new ファイル名を表す文字列を指定します。
@see File.link... -
File
. readlink(path) -> String (21412.0) -
シンボリックリンクのリンク先のパスを文字列で返します。
...す。
@raise Errno::EXXX 指定された path がシンボリックリンクでない場合や、リンクの読み取りに失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.symlink("testfile", "testlink") # => 0
File.readlink("testlink")......# => "testfile"
//}... -
File
. symlink(old , new) -> 0 (21306.0) -
old への new という名前のシンボリックリンクを生成します。
...発生します。
@param old ファイル名を表す文字列を指定します。
@param new シンボリックリンクを表す文字列を指定します。
@raise Errno::EXXX 失敗した場合に発生します。
//emlist[例][ruby]{
File.symlink("testfile", "testlink") # => 0
//}... -
File
. symlink?(path) -> bool (21300.0) -
FileTest.#symlink? と同じです。
...
FileTest.#symlink? と同じです。
@param path パスを表す文字列か IO オブジェクトを指定します。... -
File
. unlink(*filename) -> Integer (18536.0) -
ファイルを削除します。削除したファイルの数を返します。 削除に失敗した場合は例外 Errno::EXXX が発生します。
...Dir.rmdir を使います。
@param filename ファイル名を表す文字列を指定します。
@raise Errno::EXXX 失敗した場合に発生します。
//emlist[例][ruby]{
IO.write("test.txt", "test")
p File.exist?("test.txt") # => true
p File.delete("test.txt") # => 1
p File.exist?("......test.txt") # => false
begin
File.delete("test.txt")
rescue
p $! # => #<Errno::ENOENT: No such file or directory @ unlink_internal - test.txt>
end
//}... -
FileTest
. # symlink?(file) -> bool (15413.0) -
ファイルがシンボリックリンクである時に真を返します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
...た場合などには false を返します。
@param file ファイル名を表す文字列を指定します。
//emlist[例][ruby]{
IO.write("testfile", "test")
FileTest.symlink?("testfile") # => false
File.symlink("testfile", "testlink")
FileTest.symlink?("testlink") # => true
//}... -
File
:: Stat # nlink -> Integer (15406.0) -
ハードリンクの数を返します。
...ハードリンクの数を返します。
//emlist[][ruby]{
fs = File::Stat.new($0)
#例
p fs.nlink #=> 1
//}...