3件ヒット
[1-3件を表示]
(0.066秒)
別のキーワード
ライブラリ
- pathname (2)
-
rexml
/ document (1)
クラス
- Pathname (2)
-
REXML
:: Elements (1)
キーワード
-
delete
_ all (1) - unlink (1)
検索結果
先頭3件
-
Pathname
# delete -> Integer (63661.0) -
self が指すディレクトリあるいはファイルを削除します。
self が指すディレクトリあるいはファイルを削除します。
//emlist[例][ruby]{
require "pathname"
pathname = Pathname("/path/to/sample")
pathname.exist? # => true
pathname.unlink # => 1
pathname.exist? # => false
//} -
REXML
:: Elements # delete _ all(xpath) -> [REXML :: Element] (18961.0) -
xpath で指定した XPath 文字列にマッチする要素をすべて取り除きます。
xpath で指定した XPath 文字列にマッチする要素をすべて取り除きます。
@param xpath 取り除く要素を指し示す XPath 文字列
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new('<a><c/><c/><c/><c/></a>')
doc.elements.delete_all("a/c") # => [<c/>, <c/>, <c/>, <c/>]
doc.to_s # => "<a/>"
//} -
Pathname
# unlink -> Integer (18361.0) -
self が指すディレクトリあるいはファイルを削除します。
self が指すディレクトリあるいはファイルを削除します。
//emlist[例][ruby]{
require "pathname"
pathname = Pathname("/path/to/sample")
pathname.exist? # => true
pathname.unlink # => 1
pathname.exist? # => false
//}