1378件ヒット
[1-100件を表示]
(0.081秒)
別のキーワード
ライブラリ
- ビルトイン (165)
- digest (11)
-
irb
/ context (11) - openssl (33)
- pathname (1009)
- shell (24)
-
shell
/ command-processor (6) -
shell
/ filter (6) - tempfile (22)
クラス
-
Digest
:: Base (11) - File (22)
-
File
:: Stat (11) - IO (22)
-
OpenSSL
:: X509 :: Store (11) - Pathname (1009)
-
RubyVM
:: InstructionSequence (44) - Shell (24)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) - Tempfile (22)
- Thread (22)
-
Thread
:: Backtrace :: Location (33) - TracePoint (11)
モジュール
-
OpenSSL
:: X509 (22)
キーワード
- + (11)
-
/ (10) -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - <=> (22)
- Context (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 3
. 1 . 0 (3) - Options (11)
-
V
_ ERR _ DEPTH _ ZERO _ SELF _ SIGNED _ CERT (11) -
V
_ ERR _ SELF _ SIGNED _ CERT _ IN _ CHAIN (11) - absolute? (11)
-
absolute
_ path (22) -
add
_ path (11) - ascend (22)
- atime (11)
-
backtrace
_ locations (22) - basename (11)
- binread (11)
- binwrite (11)
- birthtime (10)
- blockdev? (11)
- cd (12)
- chardev? (11)
- chdir (6)
- children (11)
- chmod (11)
- chown (11)
- ctime (11)
- delete (22)
- descend (22)
- directory? (11)
- dirname (11)
-
each
_ child (22) -
each
_ entry (13) -
each
_ filename (11) -
each
_ line (22) - empty? (8)
- entries (11)
- executable? (11)
-
executable
_ real? (11) - exist? (11)
- extname (11)
- file (11)
- file? (11)
- find (22)
- fnmatch (11)
- fnmatch? (11)
- ftype (11)
- grpowned? (11)
- inspect (22)
- lchmod (11)
- lchown (11)
- lstat (11)
-
make
_ link (11) -
make
_ symlink (11) - mkdir (11)
- mkpath (11)
- mountpoint? (11)
- mtime (11)
- open (22)
- opendir (22)
- owned? (11)
- parent (11)
- pipe? (11)
-
rdoc
/ generator / json _ index (11) - read (11)
- readable? (11)
-
readable
_ real? (11) - readlines (11)
- readlink (11)
- realpath (22)
- relative? (11)
-
relative
_ path _ from (11) - rename (11)
- reopen (22)
- rmdir (11)
- rmtree (11)
- root? (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 3 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) - setgid? (11)
- setuid? (11)
- size (11)
- size? (11)
- socket? (11)
- split (11)
- stat (11)
- sticky? (11)
- sub (22)
- symlink? (11)
- sysopen (11)
-
to
_ a (11) -
to
_ path (11) -
to
_ s (11) - truncate (11)
- unlink (40)
- utime (11)
-
world
_ readable? (11) -
world
_ writable? (11) - writable? (11)
-
writable
_ real? (11) - write (11)
- zero? (11)
検索結果
先頭5件
-
Thread
:: Backtrace :: Location # path -> String (27229.0) -
self が表すフレームのファイル名を返します。
...
self が表すフレームのファイル名を返します。
例: Thread::Backtrace::Location の例1を用いた例
//emlist[][ruby]{
loc = c(0..1).first
loc.path # => "caller_locations.rb"
//}
@see Thread::Backtrace::Location#absolute_path... -
RubyVM
:: InstructionSequence # path -> String (24247.0) -
self が表す命令シーケンスの相対パスを返します。
...
self が表す命令シーケンスの相対パスを返します。
self の作成時に指定した文字列を返します。self を文字列から作成していた
場合は "<compiled>" を返します。
例1:irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1......::InstructionSequence:<compiled>@<compiled>>
iseq.path
# => "<compiled>"
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hello, world"
end
# irb
> iseq = RubyVM::InstructionSequence.compile_file('method.rb')
> iseq.path # =......> "method.rb"
@see RubyVM::InstructionSequence#absolute_path... -
File
# path -> String (24226.0) -
オープン時に使用したパスを文字列で返します。
...は self に対応するファイルを指しているとは限りません。
たとえば、ファイルが移動されていたり、削除されていたり、
File::Constants::TMPFILEオプション付きで作成されていたりする場合です。
//emlist[例][ruby]{
File.open("testfile"......) {|f| f.path } #=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f.path } #=> "/tmp/../tmp/xxx"
File.open("/tmp", File::RDWR | File::TMPFILE){|f| f.path } #=> "/tmp"
//}......文字列で返します。
パスは self に対応するファイルを指しているとは限りません。
たとえば、ファイルが移動されていたり、削除されていたりする場合です。
@raise IOError TMPFILE File::Constants::TMPFILEオプション付きで作成さ......発生します。
//emlist[例][ruby]{
File.open("testfile") {|f| f.path } #=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f.path } #=> "/tmp/../tmp/xxx"
File.open("/tmp", File::RDWR | File::TMPFILE){|f| f.path } # IOError: File is unnamed (TMPFILE?)
//}... -
Pathname
# expand _ path(default _ dir = & # 39; . & # 39;) -> Pathname (18493.0) -
Pathname.new(File.expand_path(self.to_s, *args)) と同じです。
...Pathname.new(File.expand_path(self.to_s, *args)) と同じです。
@param default_dir self が相対パスであれば default_dir を基準に展開されます。
//emlist[例][ruby]{
require "pathname"
path = Pathname("testfile")
Pathname.pwd # => #<Pathname:/path/to>
path.expand_......path # => #<Pathname:/path/to/testfile>
path.expand_path("../") # => #<Pathname:/path/testfile>
//}
@see File.expand_path... -
Pathname
# realpath -> Pathname (18418.0) -
余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。
...いた新しい Pathname オブジェクトを返します。
また、ファイルシステムをアクセスし、実際に存在するパスを返します。
シンボリックリンクも解決されます。
self が指すパスが存在しない場合は例外 Errno::ENOENT が発生しま......emlist[例][ruby]{
require 'pathname'
Dir.rmdir("/tmp/foo") rescue nil
File.unlink("/tmp/bar/foo") rescue nil
Dir.rmdir("/tmp/bar") rescue nil
Dir.mkdir("/tmp/foo")
Dir.mkdir("/tmp/bar")
File.symlink("../foo", "/tmp/bar/foo")
path = Pathname.new("bar/././//foo/../bar")
Dir.chdir("/tmp")......p path.realpath
# => ruby 1.8.0 (2003-10-10) [i586-linux]
# #<Pathname:/tmp/bar>
//}
@see Pathname#realdirpath, File.realpath... -
Pathname
# realpath(basedir = nil) -> Pathname (18418.0) -
余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。
...いた新しい Pathname オブジェクトを返します。
また、ファイルシステムをアクセスし、実際に存在するパスを返します。
シンボリックリンクも解決されます。
self が指すパスが存在しない場合は例外 Errno::ENOENT が発生しま......emlist[例][ruby]{
require 'pathname'
Dir.rmdir("/tmp/foo") rescue nil
File.unlink("/tmp/bar/foo") rescue nil
Dir.rmdir("/tmp/bar") rescue nil
Dir.mkdir("/tmp/foo")
Dir.mkdir("/tmp/bar")
File.symlink("../foo", "/tmp/bar/foo")
path = Pathname.new("bar/././//foo/../bar")
Dir.chdir("/tmp")......p path.realpath
# => ruby 1.8.0 (2003-10-10) [i586-linux]
# #<Pathname:/tmp/bar>
//}
@see Pathname#realdirpath, File.realpath... -
Pathname
# relative _ path _ from(base _ directory) -> Pathname (18353.0) -
base_directory から self への相対パスを求め、その内容の新しい Pathname オブジェクトを生成して返します。
...e_directory から self への相対パスを求め、その内容の新しい Pathname
オブジェクトを生成して返します。
パス名の解決は文字列操作によって行われ、ファイルシステムをアクセス
しません。
self が相対パスなら base_directory も......、self が絶対パスなら
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
# mkpath -> nil (18216.0) -
FileUtils.mkpath(self.to_s) と同じです。
...FileUtils.mkpath(self.to_s) と同じです。
@see FileUtils.#mkpath... -
Thread
:: Backtrace :: Location # absolute _ path -> String (15247.0) -
self が表すフレームの絶対パスを返します。
...
self が表すフレームの絶対パスを返します。
//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.absolute_path
end
# => /path/to/foo.rb
# /path....../to/foo.rb
# /path/to/foo.rb
//}
@see Thread::Backtrace::Location#path... -
OpenSSL
:: X509 :: Store # add _ path(path) -> self (12525.0) -
path が指し示すディレクトリに含まれる証明書ファイルを 信頼する証明書として加えます。
...path が指し示すディレクトリに含まれる証明書ファイルを
信頼する証明書として加えます。
@param path 証明書が含まれるディレクトリのパス
@raise OpenSSL::X509::StoreError 追加に失敗した場合に発生します...