120件ヒット
[101-120件を表示]
(0.010秒)
クラス
- Pathname (120)
キーワード
- cleanpath (12)
- fnmatch (12)
- mountpoint? (12)
- parent (12)
- realdirpath (12)
- realpath (24)
-
relative
_ path _ from (12) -
to
_ s (12)
検索結果
-
Pathname
# relative _ path _ from(base _ directory) -> Pathname (8.0) -
base_directory から self への相対パスを求め、その内容の新しい Pathname オブジェクトを生成して返します。
...base_directory から self への相対パスを求め、その内容の新しい Pathname
オブジェクトを生成して返します。
パス名の解決は文字列操作によって行われ、ファイルシステムをアクセス
しません。
self が相対パスなら base_directory......リを表す Pathname オブジェクトを指定します。
@raise ArgumentError Windows上でドライブが違うなど、base_directory から self への相対パスが求められないときに例外が発生します。
//emlist[例][ruby]{
require 'pathname'
path = Pathname.new("/tmp/fo......o")
base = Pathname.new("/tmp")
path.relative_path_from(base) # => #<Pathname:foo>
//}... -
Pathname
# to _ s -> String (8.0) -
パス名を文字列で返します。
...パス名を文字列で返します。
//emlist[例][ruby]{
require 'pathname'
path = Pathname.new("/tmp/hogehoge")
File.open(path)
//}...