るりまサーチ

最速Rubyリファレンスマニュアル検索!
831件ヒット [1-100件を表示] (0.141秒)
トップページ > クエリ:i[x] > クエリ:-[x] > クエリ:t[x] > ライブラリ:pathname[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. csv to_i
  5. matrix i

クラス

キーワード

検索結果

<< 1 2 3 ... > >>

Pathname#realdirpath(basedir = nil) -> Pathname (15502.0)

Pathname#realpath とほぼ同じで、最後のコンポーネントは実際に 存在しなくてもエラーになりません。

...
Pathname
#realpath とほぼ同じで、最後のコンポーネントは実際に
存在しなくてもエラーになりません。

@param basedir ベースディレクトリを指定します。省略するとカレントディレクトリになります。

//emlist[例][ruby]{
require "pathna...
...path = Pathname("/not_exist")
path.realdirpath # => #<Pathname:/not_exist>
path.realpath # => Errno::ENOENT

# 最後ではないコンポーネント(/not_exist_1)も存在しないのでエラーになる。
path = Pathname("/not_exist_1/not_exist_2")
path.realdirpath # => Errno::ENOENT
//...
...}

@see Pathname#realpath...

Pathname#birthtime -> Time (15302.0)

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

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

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


@see File.birthtime...

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

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

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

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

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

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

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

//emlist[例][ruby]{
require 'pathname'

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

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

Pathname#utime(atime, mtime) -> Integer (12702.0)

File.utime(atime, mtime, self.to_s) と同じです。

...File.utime(atime, mtime, self.to_s) と同じです。

@param atime 最終アクセス時刻を Time か、起算時からの経過秒数を数値で指定します。

@param mtime 更新時刻を Time か、起算時からの経過秒数を数値で指定します。


@see File.utime...

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

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

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


@see IO.binwrite...

絞り込み条件を変える

Pathname#ctime -> Time (12526.0)

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

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

//emlist[例][ruby]{
require 'pathname'

I
O.write("testfile", "test")
pathname
= Pathname("testfile")
pathname
.ctime # => 2019-01-14 00:39:51 +0900
sleep 1
pathname
.chmod(0755)
pathname
.ctime # => 2019-01-14 00:39:52 +0900
//}

@see File.cti...

Pathname#atime -> Time (12514.0)

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

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

//emlist[例][ruby]{
require "pathname"

pathname
= Pathname("testfile")
pathname
.atime # => 2018-12-18 20:58:13 +0900
//}

@see File.atime...

Pathname#mtime -> Time (12502.0)

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

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


@see File.mtime...

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

...

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

@see IO.write...

Pathname#directory? -> bool (12302.0)

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

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


@see FileTest.#directory?...

絞り込み条件を変える

<< 1 2 3 ... > >>