708件ヒット
[401-500件を表示]
(0.009秒)
ライブラリ
- ビルトイン (708)
キーワード
-
absolute
_ path (11) -
absolute
_ path? (5) - atime (11)
- basename (11)
- birthtime (10)
- blockdev? (11)
- chardev? (11)
- chmod (11)
- chown (11)
- ctime (11)
- delete (11)
- directory? (11)
- dirname (11)
- empty? (8)
- executable? (11)
-
executable
_ real? (11) - exist? (11)
- exists? (9)
- extname (11)
- file? (11)
- fnmatch (11)
- fnmatch? (11)
- ftype (11)
- grpowned? (11)
- identical? (11)
- join (11)
- lchmod (11)
- lchown (11)
- link (11)
- lstat (11)
- lutime (7)
- mkfifo (9)
- mtime (11)
- new (11)
- open (22)
- owned? (11)
- path (11)
- pipe? (11)
- readable? (11)
-
readable
_ real? (11) - readlink (11)
- realdirpath (11)
- realpath (11)
- rename (11)
- setgid? (11)
- setuid? (11)
- size (11)
- size? (11)
- socket? (11)
- split (11)
- stat (11)
- sticky? (11)
- symlink (11)
- symlink? (11)
- truncate (11)
- umask (22)
- unlink (11)
- utime (11)
-
world
_ readable? (11) -
world
_ writable? (11) - writable? (11)
-
writable
_ real? (11) - zero? (11)
検索結果
先頭5件
-
File
. path(filename) -> String (2.0) -
指定されたファイル名を文字列で返します。filename が文字列でない場合は、to_path メソッドを呼びます。
...指定されたファイル名を文字列で返します。filename が文字列でない場合は、to_path メソッドを呼びます。
@param filename ファイル名を表す文字列か to_path メソッドが定義されたオブジェクトを指定します。
//emlist[例][ruby]{
requ......ire 'pathname'
class MyPath
def initialize(path)
@path = path
end
def to_path
File.absolute_path(@path)
end
end
File.path("/dev/null") # => "/dev/null"
File.path(Pathname("/tmp")) # => "/tmp"
File.path(MyPath.new(".")) # => "/Users/user/projects/txt"
//}... -
File
. pipe?(path) -> bool (2.0) -
FileTest.#pipe? と同じです。
...
FileTest.#pipe? と同じです。
@param path パスを表す文字列か IO オブジェクトを指定します。... -
File
. readable?(path) -> bool (2.0) -
FileTest.#readable? と同じです。
...
FileTest.#readable? と同じです。
@param path パスを表す文字列か IO オブジェクトを指定します。... -
File
. readable _ real?(path) -> bool (2.0) -
FileTest.#readable_real? と同じです。
...
FileTest.#readable_real? と同じです。
@param path パスを表す文字列か IO オブジェクトを指定します。... -
File
. readlink(path) -> String (2.0) -
シンボリックリンクのリンク先のパスを文字列で返します。
...XX 指定された path がシンボリックリンクでない場合や、リンクの読み取りに失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.symlink("testfile", "testlink") # => 0
File.readlink("testlink") # => "testfile"
//}... -
File
. realdirpath(pathname , basedir = nil) -> String (2.0) -
与えられた pathname に対応する絶対パスを返します。
与えられた pathname に対応する絶対パスを返します。
pathname の最後のコンポーネントは存在していなくても例外は発生しません。
@param pathname ファイル名を指定します。
@param basedir ベースディレクトリを指定します。省略するとカレントディレクトリを使用します。
@raise Errno::ENOENT ファイルが存在しない場合に発生します。 -
File
. realpath(pathname , basedir = nil) -> String (2.0) -
与えられた pathname に対応する絶対パスを返します。
...合に発生します。
//emlist[例][ruby]{
ENV["HOME"] # => "/home/matz"
File.symlink("testfile", "testlink")
File.realpath("testfile") # => "/home/matz/testfile"
File.realpath("testlink") # => "/home/matz/testfile"
File.realpath("..", "/tmp") # => "/"
//}... -
File
. rename(from , to) -> 0 (2.0) -
ファイルの名前を変更します。ディレクトリが異なる場合には移動も行い ます。rename(2) を参照してください。移動先のファ イルが存在する時には上書きされます。
...{
begin
File.rename("testfile", "testfile.bak") # => 0
File.rename("testfile", "testfile.bak")
rescue
# 2回目の rename 時にすでに testfile が存在しないため例外が発生する
$! # => #<Errno::ENOENT: No such file or directory @ rb_file_s_rename - (testfile, testfile.bak)>... -
File
. setgid?(path) -> bool (2.0) -
FileTest.#setgid? と同じです。
...
FileTest.#setgid? と同じです。
@param path パスを表す文字列か IO オブジェクトを指定します。... -
File
. setuid?(path) -> bool (2.0) -
FileTest.#setuid? と同じです。
...
FileTest.#setuid? と同じです。
@param path パスを表す文字列か IO オブジェクトを指定します。...