278件ヒット
[1-100件を表示]
(0.036秒)
ライブラリ
- pathname (278)
キーワード
- absolute? (12)
- ascend (12)
- basename (12)
- children (12)
- chown (12)
- descend (12)
-
each
_ child (24) -
each
_ entry (3) -
each
_ line (12) - executable? (12)
-
executable
_ real? (12) - find (23)
- lchown (12)
- mountpoint? (12)
- setuid? (12)
- sub (24)
-
sub
_ ext (12) - truncate (12)
- unlink (12)
- utime (12)
検索結果
先頭5件
-
Pathname
# absolute? -> bool (6101.0) -
self が絶対パス指定であれば真を返します。
...self が絶対パス指定であれば真を返します。
//emlist[例][ruby]{
require "pathname"
pathname = Pathname("/path/to/example.rb")
pathname.absolute? # => true
pathname = Pathname("../")
pathname.absolute? # => false
//}... -
Pathname
# executable? -> bool (6101.0) -
FileTest.executable?(self.to_s) と同じです。
...FileTest.executable?(self.to_s) と同じです。
@see FileTest.#executable?... -
Pathname
# executable _ real? -> bool (6101.0) -
FileTest.executable_real?(self.to_s) と同じです。
...FileTest.executable_real?(self.to_s) と同じです。
@see FileTest.#executable_real?... -
Pathname
# mountpoint? -> bool (6101.0) -
self がマウントポイントであれば真を返します。
...self がマウントポイントであれば真を返します。
//emlist[例][ruby]{
require "pathname"
path = Pathname("/")
path.mountpoint? # => true
path = Pathname("/usr")
path.mountpoint? # => false
//}... -
Pathname
# setuid? -> bool (6101.0) -
FileTest.setuid?(self.to_s) と同じです。
...FileTest.setuid?(self.to_s) と同じです。
@see FileTest.#setuid?... -
Pathname
# sub(pattern) {|matched| . . . } -> Pathname (6101.0) -
self を表現するパス文字列に対して sub メソッドを呼び出し、その結果を内 容とする新しい Pathname オブジェクトを生成し、返します。
...self を表現するパス文字列に対して sub メソッドを呼び出し、その結果を内
容とする新しい Pathname オブジェクトを生成し、返します。
@param pattern 置き換える文字列のパターンを指定します。
@param replace pattern で指定した......文字列と置き換える文字列を指定します。
//emlist[例][ruby]{
require 'pathname'
path1 = Pathname('/usr/bin/perl')
path1.sub('perl', 'ruby') #=> #<Pathname:/usr/bin/ruby>
//}
@see String#sub... -
Pathname
# sub(pattern , replace) -> Pathname (6101.0) -
self を表現するパス文字列に対して sub メソッドを呼び出し、その結果を内 容とする新しい Pathname オブジェクトを生成し、返します。
...self を表現するパス文字列に対して sub メソッドを呼び出し、その結果を内
容とする新しい Pathname オブジェクトを生成し、返します。
@param pattern 置き換える文字列のパターンを指定します。
@param replace pattern で指定した......文字列と置き換える文字列を指定します。
//emlist[例][ruby]{
require 'pathname'
path1 = Pathname('/usr/bin/perl')
path1.sub('perl', 'ruby') #=> #<Pathname:/usr/bin/ruby>
//}
@see String#sub... -
Pathname
# sub _ ext(replace) -> Pathname (6101.0) -
拡張子を与えられた文字列で置き換えた Pathname オブジェクトを返します。
...た Pathname オブジェクトを返します。
自身が拡張子を持たない場合は、与えられた文字列を拡張子として付加します。
@param replace 拡張子を文字列で指定します。
//emlist[例][ruby]{
require "pathname"
Pathname('/usr/bin/shutdown').sub_ext('......# => #<Pathname:/usr/bin/shutdown.rb>
Pathname('/home/user/test.txt').sub_ext('.pdf') # => #<Pathname:/home/user/test.pdf>
Pathname('/home/user/test').sub_ext('.pdf') # => #<Pathname:/home/user/test.pdf>
Pathname('/home/user/test.').sub_ext('.pdf') # => #<Pathname:/home/user/test..p......df>
Pathname('/home/user/.test').sub_ext('.pdf') # => #<Pathname:/home/user/.test.pdf>
Pathname('/home/user/test.tar.gz').sub_ext('.xz') # => #<Pathname:/home/user/test.tar.xz>
//}... -
Pathname
# truncate(length) -> 0 (6101.0) -
File.truncate(self.to_s, length) と同じです。
...File.truncate(self.to_s, length) と同じです。
@param length 変更したいサイズを整数で与えます。
@see File.truncate...