本文简要介绍ruby语言中 FileUtils.touch
的用法。
用法
touch(list, noop: nil, verbose: nil, mtime: nil, nocreate: nil)
更新 list
中文件的修改时间 (mtime) 和访问时间 (atime)。如果文件不存在,则创建文件。
FileUtils.touch 'timestamp'
FileUtils.touch Dir.glob('*.c'); system 'make'
相关用法
- Ruby FileUtils.mkdir用法及代码示例
- Ruby FileUtils.compare_file用法及代码示例
- Ruby FileUtils.options_of用法及代码示例
- Ruby FileUtils.ln_s用法及代码示例
- Ruby FileUtils.install用法及代码示例
- Ruby FileUtils.chown_R用法及代码示例
- Ruby FileUtils.cp_lr用法及代码示例
- Ruby FileUtils.rmdir用法及代码示例
- Ruby FileUtils.rm_rf用法及代码示例
- Ruby FileUtils.collect_method用法及代码示例
- Ruby FileUtils.commands用法及代码示例
- Ruby FileUtils.mv用法及代码示例
- Ruby FileUtils.have_option?用法及代码示例
- Ruby FileUtils.mkdir_p用法及代码示例
- Ruby FileUtils.cd用法及代码示例
- Ruby FileUtils.cp用法及代码示例
- Ruby FileUtils.chmod_R用法及代码示例
- Ruby FileUtils.rm_f用法及代码示例
- Ruby FileUtils.rm_r用法及代码示例
- Ruby FileUtils.chmod用法及代码示例
- Ruby FileUtils.cp_r用法及代码示例
- Ruby FileUtils.ln用法及代码示例
- Ruby FileUtils.options用法及代码示例
- Ruby FileUtils.chown用法及代码示例
- Ruby FileUtils.ln_sf用法及代码示例
注:本文由纯净天空筛选整理自ruby-lang.org大神的英文原创作品 FileUtils.touch。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。