るりまサーチ

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

別のキーワード

  1. _builtin path
  2. pathname to_path
  3. _builtin absolute_path
  4. _builtin to_path
  5. pstore path

ライブラリ

クラス

キーワード

検索結果

Pathname#stat -> File::Stat (21225.0)

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

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


@see File.stat...

RDoc::Options#static_path -> [String] (12202.0)

コマンドライン引数の --copy-files オプションで指定したパスの一覧を返し ます。

コマンドライン引数の --copy-files オプションで指定したパスの一覧を返し
ます。

RDoc::Options#static_path=(vals) (12202.0)

コマンドライン引数の --copy-files オプションと同様の指定を行います。

コマンドライン引数の --copy-files オプションと同様の指定を行います。

@param vals パスを文字列の配列で指定します。

Pathname#lstat -> File::Stat (9202.0)

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

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


@see File.lstat...

File::Stat#<=>(o) -> Integer | nil (3073.0)

ファイルの最終更新時刻を比較します。self が other よりも 新しければ正の数を、等しければ 0 を古ければ負の数を返します。 比較できない場合は nil を返します。

...::Stat のインスタンスを指定します。

//emlist[][ruby]{
require 'tempfile' # for Tempfile

fp1 = Tempfile.open("first")
fp1.print "古い方\n"
sleep(1)
fp2 = Tempfile.open("second")
fp2.print "新しい方\n"

p File::Stat.new(fp1.path) <=> File::Stat.new(fp2.path) #=> -1
p File::Stat....
...new(fp2.path) <=> File::Stat.new(fp1.path) #=> 1
p File::Stat.new(fp1.path) <=> fp2.path #=> nil
//}...

絞り込み条件を変える

File::Stat#size? -> Integer | nil (3031.0)

サイズが0の時にはnil、それ以外の場合はファイルサイズを返します。

...はnil、それ以外の場合はファイルサイズを返します。

//emlist[][ruby]{
require 'tempfile'

fp = Tempfile.new("temp")
p fp.size #=> 0
p File::Stat.new(fp.path).size? #=> nil
fp.print "not 0 "
fp.close
p FileTest.exist?(fp.path) #=> true
p File::Stat.new(fp.path).size? #=> 6
//}...

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

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

...

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

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

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

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

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