るりまサーチ

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

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. fileutils rm_r
  5. fileutils cp_r

ライブラリ

キーワード

検索結果

<< 1 2 3 ... > >>

Pathname#readable_real? -> bool (12207.0)

FileTest.readable_real?(self.to_s) と同じです。

...FileTest.readable_real?(self.to_s) と同じです。


@
see FileTest.#readable_real?...

Pathname#children(with_directory = true) -> [Pathname] (6213.0)

self 配下にあるパス名(Pathnameオブジェクト)の配列を返します。

...self 配下にあるパス名(Pathnameオブジェクト)の配列を返します。

ただし、 ".", ".." は要素に含まれません。

@
param with_directory 偽を指定するとファイル名のみ返します。デフォルトは真です。

@
raise Errno::EXXX self が存在しないパ...
...スであったりディレクトリでなければ例外が発生します。

//emlist[例][ruby]{
r
equire 'pathname'
Pathname
.new("/tmp").children # => [#<Pathname:.X11-unix>, #<Pathname:.iroha_unix>, ... ]
//}...

Pathname#relative_path_from(base_directory) -> Pathname (6213.0)

base_directory から self への相対パスを求め、その内容の新しい Pathname オブジェクトを生成して返します。

...se_directory から self への相対パスを求め、その内容の新しい Pathname
オブジェクトを生成して返します。

パス名の解決は文字列操作によって行われ、ファイルシステムをアクセス
しません。

self が相対パスなら base_directory...
...絶対パスなら
base_directory も絶対パスでなければなりません。

@
param base_directory ベースディレクトリを表す Pathname オブジェクトを指定します。

@
raise ArgumentError Windows上でドライブが違うなど、base_directory から self への相対パ...
...スが求められないときに例外が発生します。

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

path = Pathname.new("/tmp/foo")
base = Pathname.new("/tmp")

path.relative_path_from(base) # => #<Pathname:foo>
//}...

Pathname#binwrite(string, offset=nil) -> Integer (6207.0)

IO.binwrite(self.to_s, *args)と同じです。

...IO.binwrite(self.to_s, *args)と同じです。


@
see IO.binwrite...

Pathname#opendir -> Dir (6207.0)

Dir.open(self.to_s, &block) と同じです。

...Dir.open(self.to_s, &block) と同じです。


@
see Dir.open...

絞り込み条件を変える

Pathname#write(string, offset=nil, **opts) -> Integer (6207.0)

...IO.write(self.to_s, string, offset, **opts)と同じです。

@
see IO.write...

Pathname#rmtree -> nil (6129.0)

FileUtils.rm_r(self.to_s) と同じです。

...FileUtils.rm_r(self.to_s) と同じです。


@
see FileUtils.#rm_r...

Pathname#birthtime -> Time (6113.0)

File.birthtime(self.to_s) を渡したものと同じです。

...File.birthtime(self.to_s) を渡したものと同じです。

@
raise NotImplementedError Windows のような birthtime のない環境で発生します。


@
see File.birthtime...

Pathname#entries -> [Pathname] (6113.0)

self に含まれるファイルエントリ名を元にした Pathname オブジェクトの配列を返します。

...した Pathname オブジェクトの配列を返します。

@
raise Errno::EXXX self が存在しないパスであったりディレクトリでなければ例外が発生します。

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

pp Pathname('/usr/local').entries
# => [#<Pathname:.>,
#...
...#<Pathname:..>,
# #<Pathname:bin>,
# #<Pathname:etc>,
# #<Pathname:include>,
# #<Pathname:lib>,
# #<Pathname:opt>,
# #<Pathname:sbin>,
# #<Pathname:share>,
# #<Pathname:var>]
//}

@
see Dir.entries...
<< 1 2 3 ... > >>