るりまサーチ

最速Rubyリファレンスマニュアル検索!
72件ヒット [1-72件を表示] (0.116秒)

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

クラス

キーワード

検索結果

Pathname#to_s -> String (21232.0)

パス名を文字列で返します。

...パス名を文字列で返します。


//emlist[例][ruby]{
r
equire 'pathname'

path
= Pathname.new("/tmp/hogehoge")
File
.open(path)
//}...

Pathname#expand_path(default_dir = '.') -> Pathname (9422.0)

Pathname.new(File.expand_path(self.to_s, *args)) と同じです。

...Pathname.new(File.expand_path(self.to_s, *args)) と同じです。

@param default_dir self が相対パスであれば default_dir を基準に展開されます。

//emlist[例][ruby]{
r
equire "pathname"

path
= Pathname("testfile")
Path
name.pwd # => #<Pathname:/path/to>
path
.expand_...
...path # => #<Pathname:/path/to/testfile>
path
.expand_path("../") # => #<Pathname:/path/testfile>
//}

@see File.expand_path...

Pathname#dirname -> Pathname (9251.0)

Pathname.new(File.dirname(self.to_s)) と同じです。

...Pathname.new(File.dirname(self.to_s)) と同じです。

//emlist[例][ruby]{
r
equire "pathname"

Path
name('/usr/bin/shutdown').dirname # => #<Pathname:/usr/bin>
//}

@see File.dirname...

Pathname#fnmatch(pattern, *args) -> bool (3187.0)

File.fnmatch(pattern, self.to_s, *args) と同じです。

...File.fnmatch(pattern, self.to_s, *args) と同じです。

@param pattern パターンを文字列で指定します。ワイルドカードとして `*', `?', `[]' が使用できま
す。Dir.glob とは違って `{}' や `**/' は使用できません。

@param args File.fnmatch...
...を参照してください。

//emlist[例][ruby]{
r
equire "pathname"

path
= Pathname("testfile")
path
.fnmatch("test*") # => true
path
.fnmatch("TEST*") # => false
path
.fnmatch("TEST*", File::FNM_CASEFOLD) # => true
//}

@see File.fnmatch...

Pathname#split -> Array (3163.0)

File.split(self.to_s) と同じです。

...File.split(self.to_s) と同じです。

//emlist[例][ruby]{
r
equire "pathname"

path
name = Pathname("/path/to/sample")
path
name.split # => [#<Pathname:/path/to>, #<Pathname:sample>]
//}

@see File.split...

絞り込み条件を変える

Pathname#chown(owner, group) -> Integer (3157.0)

File.chown(owner, group, self.to_s) と同じです。

...File.chown(owner, group, self.to_s) と同じです。

@param owner オーナーを指定します。

@param group グループを指定します。

//emlist[例][ruby]{
r
equire 'pathname'

Path
name('testfile').stat.uid # => 501
Path
name('testfile').chown(502, 12)
Path
name('testfile').stat.ui...
...d # => 502
//}

@see File.chown, File#chown...