414件ヒット
[1-100件を表示]
(0.095秒)
別のキーワード
ライブラリ
-
net
/ ftp (10) - pathname (374)
- shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6)
クラス
-
Net
:: FTP :: MLSxEntry (10) - Pathname (374)
-
RDoc
:: Options (12) - Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6)
キーワード
- binread (12)
- binwrite (12)
- chmod (12)
- chown (12)
- delete (12)
-
each
_ line (24) - extname (12)
- find (22)
- fnmatch (12)
- fnmatch? (12)
- ftype (12)
- glob (16)
- grpowned? (12)
- hash (12)
- join (12)
- lchmod (12)
- lchown (12)
- mkdir (12)
-
page
_ dir (12) - read (12)
- readlines (12)
- setgid? (12)
- size (12)
- split (18)
- sysopen (12)
-
to
_ path (12) -
to
_ s (12) - truncate (12)
- unlink (12)
- utime (12)
- write (12)
検索結果
先頭5件
-
Pathname
# glob(pattern , flags=0) -> [Pathname] (23255.0) -
ワイルドカードの展開を行なった結果を、 Pathname オブジェクトの配列として返します。
...、
Pathname オブジェクトの配列として返します。
引数の意味は、Dir.glob と同じです。 flag の初期値である 0 は「何
も指定しない」ことを意味します。
ブロックが与えられたときは、ワイルドカードにマッチした Pathname オ......部で Dir.glob の base キーワード引数を使っています。
@param pattern ワイルドカードパターンです
@param flags パターンマッチ時のふるまいを変化させるフラグを指定します
//emlist[][ruby]{
require "pathname"
Pathname("ruby-2.4.2").glob("R*.md"......) # => [#<Pathname:ruby-2.4.2/README.md>, #<Pathname:ruby-2.4.2/README.ja.md>]
//}
@see Dir.glob
@see Pathname.glob... -
Pathname
# glob(pattern , flags=0) {|pathname| . . . } -> nil (23255.0) -
ワイルドカードの展開を行なった結果を、 Pathname オブジェクトの配列として返します。
...、
Pathname オブジェクトの配列として返します。
引数の意味は、Dir.glob と同じです。 flag の初期値である 0 は「何
も指定しない」ことを意味します。
ブロックが与えられたときは、ワイルドカードにマッチした Pathname オ......部で Dir.glob の base キーワード引数を使っています。
@param pattern ワイルドカードパターンです
@param flags パターンマッチ時のふるまいを変化させるフラグを指定します
//emlist[][ruby]{
require "pathname"
Pathname("ruby-2.4.2").glob("R*.md"......) # => [#<Pathname:ruby-2.4.2/README.md>, #<Pathname:ruby-2.4.2/README.ja.md>]
//}
@see Dir.glob
@see Pathname.glob... -
Pathname
# grpowned? -> bool (23101.0) -
FileTest.grpowned?(self.to_s) と同じです。
...FileTest.grpowned?(self.to_s) と同じです。
@see FileTest.#grpowned?... -
Pathname
# setgid? -> bool (23101.0) -
FileTest.setgid?(self.to_s) と同じです。
...FileTest.setgid?(self.to_s) と同じです。
@see FileTest.#setgid?... -
Net
:: FTP :: MLSxEntry # pathname -> String (18202.0) -
パス名を返します。
パス名を返します。 -
Pathname
# join(*args) -> Pathname (17238.0) -
与えられたパス名を連結します。
...を連結します。
@param args 連結したいディレクトリ名やファイル名を文字列で与えます。
//emlist[例][ruby]{
require "pathname"
path0 = Pathname("/usr") # Pathname:/usr
path0 = path0.join("bin/ruby") # Pathname:/usr/bin/ruby
# 上記の p......ath0 の処理は下記の path1 と同様のパスになります
path1 = Pathname("/usr") + "bin/ruby" # Pathname:/usr/bin/ruby
path0 == path1 #=> true
//}... -
Pathname
# find(ignore _ error: true) {|pathname| . . . } -> nil (17224.0) -
self 配下のすべてのファイルやディレクトリを 一つずつ引数 pathname に渡してブロックを実行します。
...ィレクトリを
一つずつ引数 pathname に渡してブロックを実行します。
require 'find'
Find.find(self.to_s) {|f| yield Pathname.new(f)}
と同じです。
ブロックを省略した場合は Enumerator を返します。
@param ignore_error 探索中に発生した例... -
Pathname
# each _ line(*args) -> Enumerator (17149.0) -
IO.foreach(self.to_s, *args, &block) と同じです。
...oreach(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("testfil......e", "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
# each _ line(*args) {|line| . . . } -> nil (17149.0) -
IO.foreach(self.to_s, *args, &block) と同じです。
...oreach(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("testfil......e", "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
# binread(*args) -> String | nil (17137.0) -
IO.binread(self.to_s, *args)と同じです。
...ead(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(20, 10)...