Closed 0x1eef closed 5 months ago
Allow a temporary file to be created with no read, write or execute permissions for any user or group. You could also choose another set of permissions. Similar to File.new and File.open. Continue with the default of 0600.
Example:
tmpfile = Tempfile.new("foo", perm: 0) tmpfile.write("bar") # => 3 tmpfile.rewind tmpfile.read # => bar tmpfile.stat.mode & 0777 # => 0
I don't know if this will be accepted or not; if there is interest in it I can update the docs. Thanks.
It doesn't look like this pull request will be merged. Closing.
Allow a temporary file to be created with no read, write or execute permissions for any user or group. You could also choose another set of permissions. Similar to File.new and File.open. Continue with the default of 0600.
Example:
I don't know if this will be accepted or not; if there is interest in it I can update the docs. Thanks.