るりまサーチ

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

別のキーワード

  1. _builtin file?
  2. _builtin file
  3. file size
  4. file path
  5. file open

ライブラリ

キーワード

検索結果

Pathname#fnmatch(pattern, *args) -> bool (152.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]{
require "pathname"

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

@see File.fnmatch...

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

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

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

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

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

@see File.fnmatch?...

Pathname#open(mode = 'r', perm = 0666) -> File (141.0)

File.open(self.to_s, *args, &block) と同じです。

...File.open(self.to_s, *args, &block) と同じです。


@see File.open...

Pathname#open(mode = 'r', perm = 0666) {|file| ... } -> object (141.0)

File.open(self.to_s, *args, &block) と同じです。

...File.open(self.to_s, *args, &block) と同じです。


@see File.open...

Pathname#expand_path(default_dir = '.') -> Pathname (39.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]{
require "pathname"

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

@see File.expand_path...

絞り込み条件を変える