论坛首页 入门技术论坛

请问如何用ruby创建一个新文件

浏览 3662 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2007-04-06  
用File类好像不行
   发表时间:2007-04-06  
Open the file in write mode ('w'). The file will be created if it doesn't exist, and truncated to zero bytes if it does exist. You can then use IO#write or the << operator to write strings to the file, as though the file itself were a string and you were appending to it.
0 请登录后投票
   发表时间:2007-04-06  
thanks
0 请登录后投票
论坛首页 入门技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics