摘要:
临时目录或者日志目录的过期或者无用的文件,需要写个程序定时清除下N天之前的旧文件, 保证服务器硬盘不那么容易爆满。 walkFiles 历遍文件,getCreationTime 获取文件创建时间, removeFile tryremoveFile 等来自os模块。 日期时间的运算,需要用到times 阅读全文
posted @ 2021-08-04 01:40
墨镜带佬星
阅读(167)
评论(2)
推荐(0)