Sha256: ccc8ef0112364ad6c20c89b54225727fc3509f92b438652f5b38aab0af74b0dd
Contents?: true
Size: 841 Bytes
Versions: 6
Compression:
Stored size: 841 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 def self.cache_root_path cache_path = Pod::Config.instance.cache_root + 'Pods' cache_path end end end
Version data entries
6 entries across 6 versions & 1 rubygems