108件ヒット
[101-108件を表示]
(0.136秒)
検索結果
-
File
. extname(filename) -> String (7.0) -
ファイル名 filename の拡張子部分(最後の "." に続く文字列)を 返します。ディレクトリ名に含まれる "." や、ファイル名先頭の "." は拡張子の一部としては見なされません。filename に拡張子が含 まれない場合は空文字列を返します。
...tar.gz") # => ".gz"
p File.extname("foo/bar") # => ""
p File.extname("foo/.bar") # => ""
p File.extname("foo.txt/bar") # => ""
p File.extname(".foo") # => ""
//}
@param filename ファイル名を表す文字列を指定します。
@see File.basename, File.dirname......") # => ""
p File.extname(".foo") # => ""
# Windows の場合
p File.extname("foo.") # => ""
# Windows 以外の場合
p File.extname("foo.") # => "."
//}
@param filename ファイル名を表す文字列を指定します。
@see File.basename, File.dirname...