📄 07 - writing to a temporary file.rb
字号:
require 'tempfile'out = Tempfile.new("tempfile")out.path # => "/tmp/tempfile23786.0"#---out << "Some text."out.rewindout.read # => "Some text."out.close#---out = Tempfile.new("myhome_tempfile", "/home/leonardr/temp/")#---require 'fileutils'FileUtils.mv(out.path, "/home/leonardr/old_tempfile")#---
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -