Sha256: c294fa731a20f8d63bf03db939eb51dd57b87eec0fbd0b2cdb4ec4f106ce66bc
Contents?: true
Size: 726 Bytes
Versions: 21
Compression:
Stored size: 726 Bytes
Contents
module LgPodPlugin class LFileManager def self.cache_director Pathname(File.join(Dir.home, "Library/Caches")) end # 本地下载路径 ~Library/Caches/LgPodPlugin def self.download_director cache_path = self.cache_director.join("LgPodPlugin") # pp "文件路径不存在, 就创建" cache_path.mkdir(0700) unless cache_path.exist? cache_path end # pod缓存工作目录, 根据项目所在路径计算所得 确保唯一 def self.cache_workspace(root) timestamp = "_#{Time.now.to_i}_" key = root.to_path + timestamp + "#{(rand * 10000000).to_i}" director = LUtils.md5(key) return self.download_director.join(director) end end end
Version data entries
21 entries across 21 versions & 1 rubygems