1087件ヒット
[1-100件を表示]
(0.129秒)
種類
- インスタンスメソッド (885)
- 特異メソッド (96)
- 文書 (84)
- ライブラリ (11)
- 定数 (11)
ライブラリ
- ビルトイン (85)
-
net
/ ftp (36) - pathname (831)
- shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6)
クラス
- File (66)
-
Net
:: FTP (27) -
Net
:: FTP :: MLSxEntry (9) - Pathname (831)
-
RDoc
:: Options (22) - Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6)
モジュール
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - <=> (11)
-
FNM
_ PATHNAME (11) -
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (9) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) - Ruby用語集 (11)
- ascend (11)
- atime (11)
- basename (11)
- binread (11)
- binwrite (11)
- birthtime (10)
- children (11)
- chmod (11)
- chown (11)
- cleanpath (11)
- ctime (11)
- delete (11)
- descend (11)
- directory? (11)
- dirname (11)
-
each
_ child (22) -
each
_ entry (11) -
each
_ filename (11) -
each
_ line (22) - entries (11)
- exist? (11)
- extname (11)
- file? (11)
- find (22)
- fnmatch (11)
- fnmatch? (11)
- ftype (11)
- glob (29)
- hash (11)
- join (11)
- lchmod (11)
- lchown (11)
- lstat (11)
-
make
_ link (11) -
make
_ symlink (11) - mkdir (11)
- mkpath (11)
- mlsd (18)
- mlst (9)
- mountpoint? (11)
- mtime (11)
- open (22)
- opendir (22)
-
page
_ dir (11) -
parse
_ file (8) - path (11)
- pipe? (11)
-
rdoc
/ generator / json _ index (11) - read (11)
- readlines (11)
- readlink (11)
- realdirpath (22)
- realpath (33)
- relative? (11)
-
relative
_ path _ from (11) - rmdir (11)
- rmtree (11)
- root (11)
-
ruby 1
. 8 . 3 feature (11) -
ruby 1
. 9 feature (11) - setgid? (11)
- setuid? (11)
- size (11)
- size? (11)
- split (40)
- stat (11)
- sticky? (11)
- symlink? (11)
- sysopen (11)
-
to
_ path (11) -
to
_ s (11) - unlink (11)
- utime (11)
-
world
_ writable? (11) - writable? (11)
-
writable
_ real? (11) - write (11)
検索結果
先頭5件
-
Pathname
# each _ child(with _ directory = true) {|pathname| . . . } -> [Pathname] (23422.0) -
self.children(with_directory).each と同じです。
...f.children(with_directory).each と同じです。
@param with_directory 偽を指定するとファイル名のみ返します。デフォルトは真です。
//emlist[例][ruby]{
require "pathname"
Pathname("/usr/local").each_child {|f| p f }
# => #<Pathname:/usr/local/bin>
# => #<Pathname:/us......c>
# => #<Pathname:/usr/local/include>
# => #<Pathname:/usr/local/lib>
# => #<Pathname:/usr/local/opt>
# => #<Pathname:/usr/local/sbin>
# => #<Pathname:/usr/local/share>
# => #<Pathname:/usr/local/var>
Pathname("/usr/local").each_child(false) {|f| p f }
# => #<Pathname:bin>
# => #<Pathname:etc>
# =......> #<Pathname:include>
# => #<Pathname:lib>
# => #<Pathname:opt>
# => #<Pathname:sbin>
# => #<Pathname:share>
# => #<Pathname:var>
//}
@see Pathname#children... -
Pathname
# realdirpath(basedir = nil) -> Pathname (23347.0) -
Pathname#realpath とほぼ同じで、最後のコンポーネントは実際に 存在しなくてもエラーになりません。
...
Pathname#realpath とほぼ同じで、最後のコンポーネントは実際に
存在しなくてもエラーになりません。
@param basedir ベースディレクトリを指定します。省略するとカレントディレクトリになります。
//emlist[例][ruby]{
require "pathna......me"
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... -
Pathname
# binwrite(string , offset=nil) -> Integer (23300.0) -
IO.binwrite(self.to_s, *args)と同じです。
...
IO.binwrite(self.to_s, *args)と同じです。
@see IO.binwrite... -
Pathname
# utime(atime , mtime) -> Integer (23300.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
# entries -> [Pathname] (23289.0) -
self に含まれるファイルエントリ名を元にした Pathname オブジェクトの配列を返します。
...した Pathname オブジェクトの配列を返します。
@raise Errno::EXXX self が存在しないパスであったりディレクトリでなければ例外が発生します。
//emlist[例][ruby]{
require 'pathname'
require '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... -
Pathname
# each _ line(*args) {|line| . . . } -> nil (23248.0) -
IO.foreach(self.to_s, *args, &block) と同じです。
...IO.foreach(self.to_s, *args, &block) と同じです。
//emlist[例][ruby]{
require "pathname"
IO.write("testfile", "line1\nline2,\nline3\n")
Pathname("testfile").each_line
# => #<Enumerator: IO:foreach("testfile")>
//}
//emlist[例 ブロックを指定][ruby]{
require "pathname"
IO.write("tes......tfile", "line1\nline2,\nline3\n")
Pathname("testfile").each_line {|f| p f }
# => "line1\n"
# => "line2,\n"
# => "line3\n"
//}
//emlist[例 limit を指定][ruby]{
require "pathname"
IO.write("testfile", "line1\nline2,\nline3\n")
Pathname("testfile").each_line(4) {|f| p f }
# => "line"
# => "1\n"......# => "line"
# => "2,\n"
# => "line"
# => "3\n"
//}
//emlist[例 sep を指定][ruby]{
require "pathname"
IO.write("testfile", "line1\nline2,\nline3\n")
Pathname("testfile").each_line(",") {|f| p f }
# => "line1\nline2,"
# => "\nline3\n"
//}
@see IO.foreach... -
Pathname
# relative _ path _ from(base _ directory) -> Pathname (23247.0) -
base_directory から self への相対パスを求め、その内容の新しい Pathname オブジェクトを生成して返します。
...base_directory から self への相対パスを求め、その内容の新しい Pathname
オブジェクトを生成して返します。
パス名の解決は文字列操作によって行われ、ファイルシステムをアクセス
しません。
self が相対パスなら base_directory......lf が絶対パスなら
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
# children(with _ directory = true) -> [Pathname] (23241.0) -
self 配下にあるパス名(Pathnameオブジェクト)の配列を返します。
...self 配下にあるパス名(Pathnameオブジェクト)の配列を返します。
ただし、 ".", ".." は要素に含まれません。
@param with_directory 偽を指定するとファイル名のみ返します。デフォルトは真です。
@raise Errno::EXXX self が存在しないパ......スであったりディレクトリでなければ例外が発生します。
//emlist[例][ruby]{
require 'pathname'
Pathname.new("/tmp").children # => [#<Pathname:.X11-unix>, #<Pathname:.iroha_unix>, ... ]
//}... -
Pathname
# join(*args) -> Pathname (23237.0) -
与えられたパス名を連結します。
...list[例][ruby]{
require "pathname"
path0 = Pathname("/usr") # Pathname:/usr
path0 = path0.join("bin/ruby") # Pathname:/usr/bin/ruby
# 上記の path0 の処理は下記の path1 と同様のパスになります
path1 = Pathname("/usr") + "bin/ruby" # Pathname:/usr/bi... -
Pathname
# binread(*args) -> String | nil (23236.0) -
IO.binread(self.to_s, *args)と同じです。
...IO.binread(self.to_s, *args)と同じです。
//emlist[例][ruby]{
require "pathname"
pathname = Pathname("testfile")
pathname.binread # => "This is line one\nThis is line two\nThis is line three\nAnd so on...\n"
pathname.binread(20) # => "This is line one\nThi"
pathname.binread(2......0, 10) # => "ne one\nThis is line "
//}
@see IO.binread...