Project

General

Profile

Feature #11583

Add File#unlink

Added by ksss (Yuki Kurihara) almost 5 years ago. Updated almost 5 years ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:<unknown>]

Description

I propose new method File#unlink.

File#unlink is same as Fille.unlink like this.

class File
  def unlink
    File.unlink(path)
  end
end

It is more objective.
And will be able to write duck typeing with Tempfile#unlink

- Tempfile.open do |f|
+ Tempfile.create do |f|
  f.unlink # Not raise an error
end

Files

file-unlink.patch (1.44 KB) file-unlink.patch ksss (Yuki Kurihara), 10/12/2015 04:28 AM

Related issues

Related to Ruby master - Feature #11218: File.open FILE_SHARE_DELETEClosedActions

Also available in: Atom PDF