VictoriaFreSh 2021.4.17 → 2021.4.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c90c85569d4f2c8396f17754e03eb87e35c272b015397983c2afa9af9492ccf
4
- data.tar.gz: e88f1ac7afb0ab584ed2973fcceec8701f379c0e5e7f0a22e3be07569799c63c
3
+ metadata.gz: 82c0c58d9b1daeffc9217b052959a5b67bf8547a2c51e58cb1fcfa4632fa1839
4
+ data.tar.gz: 341d862e0b92956637f54c8bd482e93e6ac0ad907a07c6532605008a4a5dc66a
5
5
  SHA512:
6
- metadata.gz: 130b068d432a0199bab6ab093619e4c0e56f31a5437115138a767e719f62083fe07c45abd6cbb5f90661a99122ffa3a8efea57e815c42ccf007ecf7bc5b64e9a
7
- data.tar.gz: 3c25711cbca993d774d5581f507c7087951304fcb3ae5dfb971ce0cfc93f58b7364c28108e56be3976dffd884d9f7d68dbd9290967fe3293954f03e095bca05c
6
+ metadata.gz: 3dbc4bc708a277f8d2d4b5277aecd1ba9c5ecd5f3075dcf2d7ac68849bd526e0ef821e747b140fd82aa3f1b6f61860a30dc737dc57b75470eea635a49d412f41
7
+ data.tar.gz: 33db88a60ea8c9fd03562089312df3e6ddda6bfc41517d29177586a541278871e58075b4b9af057838935f8f089c3727373a682afc79a449a53de5b4377f34d8
data/lib/victoriafresh.rb CHANGED
@@ -21,20 +21,22 @@ class VictoriaFresh
21
21
  @diskWriteFileObject={} #向磁盘写入文件的对象
22
22
  @contentString="" #内容字符串
23
23
  @contentPartArray=[] #内容片段数组
24
+ @currentDiskFlushSuffix=0 #当前的磁盘文件后缀
25
+ @bufferLength=0 #缓冲区总长度
24
26
  end
25
27
 
26
28
  def checkMemoryUsage(lineNumber)
27
- mem= GetProcessMem.new
28
-
29
+ mem= GetProcessMem.new
30
+
29
31
  puts("#{lineNumber} , Memory: #{mem.mb}"); #Debug
30
-
32
+
31
33
  end #def checkMemoryUsage
32
-
34
+
33
35
 
34
36
  def releaseFiles(victoriaFreshPackagedFileString, contentString) #释放目录树
35
- # packagedFile=Com::Stupidbeauty::Victoriafresh::FileMessage.decode(victoriaFreshPackagedFileString) #解码文件消息对象。
37
+ # packagedFile=Com::Stupidbeauty::Victoriafresh::FileMessage.decode(victoriaFreshPackagedFileString) #解码文件消息对象。
36
38
  packagedFile=CBOR.decode(victoriaFreshPackagedFileString) #解码
37
-
39
+
38
40
 
39
41
  puts packagedFile #Debug
40
42
 
@@ -63,7 +65,7 @@ class VictoriaFresh
63
65
  elsif #带权限字段
64
66
  File.chmod(permissionNumber, pathToMake) #设置权限
65
67
  end #if (permissionNumber.nil?) #不带权限字段
66
-
68
+
67
69
  end #writeFile(pathPrefix, packagedFile, contentString) #写入文件
68
70
 
69
71
  #创建符号链接
@@ -73,12 +75,12 @@ class VictoriaFresh
73
75
 
74
76
  pathToMake=pathPrefix + '/' + packagedFile['name'] #构造文件名
75
77
 
76
- # victoriaFreshDataFile=File.new(pathToMake , "wb") #数据文件。
77
- # victoriaFreshDataFile.syswrite(victoriaFreshData) #写入文件。
78
- # victoriaFreshDataFile.close #关闭文件。
79
- #
80
- # FileUtils.touch pathToMake, :mtime => timeObject #设置修改时间
81
-
78
+ # victoriaFreshDataFile=File.new(pathToMake , "wb") #数据文件。
79
+ # victoriaFreshDataFile.syswrite(victoriaFreshData) #写入文件。
80
+ # victoriaFreshDataFile.close #关闭文件。
81
+ #
82
+ # FileUtils.touch pathToMake, :mtime => timeObject #设置修改时间
83
+
82
84
  puts("data: #{victoriaFreshData}, path: #{pathToMake}") #Debug
83
85
 
84
86
  FileUtils.symlink(victoriaFreshData, pathToMake, force: true) #创建符号链接
@@ -87,7 +89,7 @@ class VictoriaFresh
87
89
 
88
90
  if (permissionNumber.nil?) #不带权限字段
89
91
  elsif #带权限字段
90
- # File.chmod(permissionNumber, pathToMake) #设置权限
92
+ # File.chmod(permissionNumber, pathToMake) #设置权限
91
93
  begin #尝试修改链接本身的权限
92
94
  File.lchmod(permissionNumber, pathToMake) #设置权限
93
95
  rescue NotImplementedError #未实现
@@ -97,31 +99,31 @@ class VictoriaFresh
97
99
  end #def makeSymlink(pathPrefix, packagedFile, contentString) #创建符号链接
98
100
 
99
101
  def getTimeObject(packagedFile) #构造时间戳对象
100
- # seconds=packagedFile.timestamp.seconds #获取秒数
102
+ # seconds=packagedFile.timestamp.seconds #获取秒数
101
103
  seconds=packagedFile['timestamp']['seconds'] #获取秒数
102
-
103
- # microSeconds=packagedFile.timestamp.nanos/ 1000.0 #获取毫秒数
104
+
105
+ # microSeconds=packagedFile.timestamp.nanos/ 1000.0 #获取毫秒数
104
106
  microSeconds=packagedFile['timestamp']['nanos'] / 1000.0 #获取毫秒数
105
107
 
106
108
  timeObject=Time.at(seconds, microSeconds) #构造时间对象
107
-
109
+
108
110
  end #getTimeObject(packagedFile) #构造时间戳对象
109
111
 
110
112
  def makeDirectory(pathPrefix, packagedFile) #创建目录
111
113
  timeObject=getTimeObject(packagedFile) #构造时间戳对象
112
-
113
114
 
114
- # puts 'mkdir' #Debug
115
+
116
+ # puts 'mkdir' #Debug
115
117
  pathToMake=File.join(pathPrefix, packagedFile['name'])
116
118
 
117
- # puts pathToMake #Debug.
119
+ # puts pathToMake #Debug.
118
120
 
119
121
  if (Dir.exist?(pathToMake)) #目录已经存在
120
122
  else #目录 不存在
121
123
  Dir.mkdir(pathToMake) #=> 0
122
124
  end #if (Dir.exist?(pathToMake)) #目录已经存在
123
125
 
124
-
126
+
125
127
  FileUtils.touch pathToMake, :mtime => timeObject #设置修改时间
126
128
 
127
129
  permissionNumber=packagedFile['permission'] #获取权限数字
@@ -151,173 +153,187 @@ class VictoriaFresh
151
153
  end #if packagedFile.is_file #是文件,则直接写入文件
152
154
  end #def releaseFile(packagedFile, contentString) #释放一个文件
153
155
 
154
- #考虑是否要向磁盘先输出内容
156
+ #考虑是否要向磁盘先输出内容
155
157
  def assessDiskFlush(layer, isFinalPart=false)
156
- # contentString=contentStringInput #要处理的内容字符串
157
-
158
- # if (layer==0) #是最外层
159
- while (@contentString.length >= @diskFlushSize) #还有内容要写入
160
- contentToWrite=@contentString[0, @diskFlushSize] #取出开头的一段
161
-
162
-
163
-
164
- @contentString=@contentString[@diskFlushSize, @contentString.length-@diskFlushSize] #留下剩余的部分
165
-
166
- if (@diskFlush) #要向磁盘写入内容
167
-
168
- @diskWriteFileObject.syswrite(contentToWrite) #写入内容
169
-
170
- @diskWriteFileObject.flush #写入磁盘
158
+ if (@diskFlush) #要做磁盘写入
159
+ if (@bufferLength>=@diskFlushSize) #缓冲区总长度已经超过需要的文件长度
160
+ @contentString = @contentPartArray.join #重组成整个字符串
171
161
 
172
- else #不向磁盘写入内容
173
- @contentPartArray << contentToWrite #记录到数组中
174
-
175
- end #if (@diskFlush) #要向磁盘写入内容
176
- end #while (contentString.length >= @diskFlushSize) #还有内容要写入
177
-
178
- if (isFinalPart) #是最后一部分
179
- contentToWrite=@contentString #要写入的内容
180
-
181
- # @contentPartArray << contentToWrite #记录到数组中
182
-
183
- @contentString="" #字符串清空
162
+ @contentPartArray.clear #清空数组
163
+
164
+ while (@contentString.length >= @diskFlushSize) #还有内容要写入
165
+ contentToWrite=@contentString[0, @diskFlushSize] #取出开头的一段
166
+
167
+ @contentString=@contentString[@diskFlushSize, @contentString.length-@diskFlushSize] #留下剩余的部分
168
+
169
+ if (@diskMultiFile) #多个磁盘文件
170
+ @diskWriteFileObject=File.new(@diskFileName+@currentDiskFlushSuffix.to_s, 'wb') #打开文件
171
+
172
+ @currentDiskFlushSuffix=@currentDiskFlushSuffix+1 #增加计数
173
+
174
+ @diskWriteFileObject.syswrite(contentToWrite) #写入内容
175
+
176
+ @diskWriteFileObject.close
177
+ else #单个磁盘文件
178
+
179
+ @diskWriteFileObject.syswrite(contentToWrite) #写入内容
180
+
181
+ @diskWriteFileObject.flush #写入磁盘
182
+ end #@currentDiskFlushSuffix
183
+ end #while (contentString.length >= @diskFlushSize) #还有内容要写入
184
+
185
+ @contentPartArray << @contentString #剩余部分重新加入数组中
186
+ @bufferLength=@contentString.length #重新记录缓冲区总长度
187
+ end #if (bufferLength>=@diskFlushSize) #缓冲区总长度已经超过需要的文件长度
184
188
 
185
- if (@diskFlush) #要向磁盘写入内容
189
+ if (isFinalPart) #是最后一部分
190
+ @contentString = @contentPartArray.join #重组成整个字符串
191
+
192
+ @contentPartArray.clear #清空字符串数组
193
+ @bufferLength=0 #缓冲区长度归零
186
194
 
187
- @diskWriteFileObject.syswrite(contentToWrite) #写入内容
195
+ contentToWrite=@contentString #要写入的内容
188
196
 
189
- @diskWriteFileObject.close #关闭文件
190
- else #不向磁盘写入内容
191
- @contentPartArray << contentToWrite #记录到数组中
192
-
197
+ @contentString="" #字符串清空
193
198
 
194
- end #if (@diskFlush) #要向磁盘写入内容
195
-
196
- end #if (isFinalPart) #是最后一部分
197
- # end #if (layer==0) #是最外层
198
-
199
- # end #if (@diskFlush) #要向磁盘写入内容
200
-
201
- return @contentString #返回内容
199
+ if (@diskMultiFile) #多个磁盘文件
200
+ @diskWriteFileObject=File.new(@diskFileName+@currentDiskFlushSuffix.to_s, 'wb') #打开文件
201
+
202
+ @currentDiskFlushSuffix=@currentDiskFlushSuffix+1 #增加计数
203
+
204
+ @diskWriteFileObject.syswrite(contentToWrite) #写入内容
205
+
206
+ @diskWriteFileObject.close
207
+
208
+
209
+ else #单个磁盘文件
210
+ @diskWriteFileObject.syswrite(contentToWrite) #写入内容
211
+
212
+ @diskWriteFileObject.close #关闭文件
213
+
214
+ end #if (@diskMultiFile) #多个磁盘文件
215
+ end #if (isFinalPart) #是最后一部分
216
+ end #if (@diskFlush) #要做磁盘写入
202
217
  end #contentString= assessDiskFlush(contentString) #考虑是否要向磁盘先输出内容
203
218
 
204
- def checkOnce(directoryPath, startIndex=0, layer=0) #打包一个目录树。
205
- if (@diskFlush) #要向磁盘写入文件
206
-
207
- if (layer==0) #最外层
208
- if (@diskMultiFile) #要写多个文件
209
- else #不写多个文件
210
- @diskWriteFileObject=File.new(@diskFileName, 'wb') #打开文件
211
- end #if (@diskMultiFile) #要写多个文件
212
- end #if (layer==0) #最外层
213
-
214
- end #if (@diskFlush) #要向磁盘写入文件s
215
-
216
- packagedFile={} #创建文件消息对象。
217
-
218
- packagedFile['sub_files'] = [] #加入到子文件列表中。
219
-
220
- directoryPathName=Pathname.new(directoryPath) #构造路径名字对象。
221
-
222
- baseName=directoryPathName.basename.to_s #基本文件名。
223
-
224
- packagedFile['name']=baseName #设置文件名。
225
-
226
- isFile=directoryPathName.file? #是否是文件。
227
- isSymLink=directoryPathName.symlink? #是否是符号链接
228
-
229
- packagedFile['is_file']=isFile #设置属性,是否是文件。
230
- packagedFile['file_start_index']=startIndex #记录文件内容的开始位置。
231
-
232
- packagedFile['is_symlink']=isSymLink #设置属性,是否是符号链接
233
-
234
- puts directoryPath #Dbug.
235
-
236
- #记录时间戳:
237
- begin #读取时间戳
238
- mtimeStamp=File.mtime(directoryPath) #获取时间戳
239
-
240
- packagedFile['timestamp']={} #时间戳
241
- packagedFile['timestamp']['seconds']=mtimeStamp.tv_sec #设置秒数
242
- packagedFile['timestamp']['nanos']=mtimeStamp.tv_nsec #设置纳秒数
243
-
244
- packagedFile['permission']=(File.stat(directoryPath).mode & 07777 ) #设置权限信息
245
- rescue Errno::ENOENT
246
- rescue Errno::EACCES #权限受限
247
- end #begin #读取时间戳
248
-
249
- if (isFile) #是文件,不用再列出其子文件了。
250
- packagedFile['file_length']=directoryPathName.size #记录文件的内容长度。
251
-
252
- #读取文件内容:
253
- fileToReadContent=File.new(directoryPath,"rb") #创建文件。
254
- @contentString= @contentString + fileToReadContent.read #全部读取。
255
-
256
- assessDiskFlush(layer) #考虑是否要向磁盘先输出内容
257
- elsif (isSymLink) #是符号链接
258
- linkTarget=directoryPathName.readlink #获取链接目标
259
-
260
- # 待续,设置内容长度。符号链接字符串的长度
261
- packagedFile['file_length']=linkTarget.to_s.bytesize #记录文件的内容长度。
262
-
263
- #读取文件内容:
264
- # fileToReadContent=File.new(directoryPath,"rb") #创建文件。
265
- @contentString= @contentString + StringIO.new(linkTarget.to_s).binmode.read #全部读取。
266
-
267
- assessDiskFlush(layer) #考虑是否要向磁盘先输出内容
268
-
269
- else #是目录。
270
- # contentString="" #容纳内容的字符串。
271
- subFileStartIndex=startIndex #子文件的起始位置,以此目录的起始位置为基准。
272
-
273
- packagedFile['file_length']=0 #本目录的内容长度。
274
-
275
- directoryPathName.each_child do |subFile| #一个个文件地处理。
276
- # puts("sub file: #{subFile}, class: #{subFile.class}, symlink: #{subFile.symlink?}, expand_path: #{subFile.expand_path}, file?: #{subFile.file?}") #Debug.
277
- # checkMemoryUsage(221)
278
- realPath=subFile.expand_path #获取绝对路径。
219
+ def checkOnce(directoryPath, startIndex=0, layer=0) #打包一个目录树。
220
+ if (@diskFlush) #要向磁盘写入文件
221
+ if (layer==0) #最外层
222
+ if (@diskMultiFile) #要写多个文件
223
+ else #不写多个文件
224
+ @diskWriteFileObject=File.new(@diskFileName, 'wb') #打开文件
225
+ end #if (@diskMultiFile) #要写多个文件
226
+ end #if (layer==0) #最外层
227
+ end #if (@diskFlush) #要向磁盘写入文件s
279
228
 
280
- packagedSubFile,subFileContent=checkOnce(realPath,subFileStartIndex, layer+1) #打包这个子文件。
229
+ packagedFile={} #创建文件消息对象。
281
230
 
282
- packagedFile['sub_files'] << packagedSubFile #加入到子文件列表中。
231
+ packagedFile['sub_files'] = [] #加入到子文件列表中。
283
232
 
284
- # puts("sub file content: #{subFileContent}, nil?: #{subFileContent.nil?}" ) #Debug
233
+ directoryPathName=Pathname.new(directoryPath) #构造路径名字对象。
285
234
 
286
- # puts(" content: #{contentString}, nil?: #{contentString.nil? }") #Debug
287
-
288
- # contentString = contentString + subFileContent #串接文件内容。
235
+ baseName=directoryPathName.basename.to_s #基本文件名。
289
236
 
290
- assessDiskFlush(layer) #考虑是否要向磁盘先输出内容
291
-
237
+ packagedFile['name']=baseName #设置文件名。
292
238
 
293
- subFileStartIndex+=packagedSubFile['file_length'] #记录打包的子文件的长度,更新下一个要打包的子文件的起始位置。
239
+ isFile=directoryPathName.file? #是否是文件。
240
+ isSymLink=directoryPathName.symlink? #是否是符号链接
294
241
 
295
- # puts("237, content string length: #{contentString.length}") #Debug
242
+ packagedFile['is_file']=isFile #设置属性,是否是文件。
243
+ packagedFile['file_start_index']=startIndex #记录文件内容的开始位置。
296
244
 
297
- packagedFile['file_length']+=packagedSubFile['file_length'] #随着子文件的打包而更新本目录的总长度。
298
- end #directoryPathName.each_child do |subFile| #一个个文件地处理。
299
- end #if (isFile) #是文件,不用再列出其子文件了。
300
-
301
- # puts("300, contentString: #{contentString}, nil?: #{contentString.nil?}, direcotry path: #{directoryPath}, layer: #{layer}") #Debug
302
-
245
+ packagedFile['is_symlink']=isSymLink #设置属性,是否是符号链接
246
+
247
+ puts directoryPath #Dbug.
248
+
249
+ #记录时间戳:
250
+ begin #读取时间戳
251
+ mtimeStamp=File.mtime(directoryPath) #获取时间戳
252
+
253
+ packagedFile['timestamp']={} #时间戳
254
+ packagedFile['timestamp']['seconds']=mtimeStamp.tv_sec #设置秒数
255
+ packagedFile['timestamp']['nanos']=mtimeStamp.tv_nsec #设置纳秒数
256
+
257
+ packagedFile['permission']=(File.stat(directoryPath).mode & 07777 ) #设置权限信息
258
+ rescue Errno::ENOENT
259
+ rescue Errno::EACCES #权限受限
260
+ end #begin #读取时间戳
261
+
262
+ if (isFile) #是文件,不用再列出其子文件了。
263
+ packagedFile['file_length']=directoryPathName.size #记录文件的内容长度。
264
+
265
+ #读取文件内容:
266
+ fileToReadContent=File.new(directoryPath,"rb") #创建文件。
267
+ currentFileContent=fileToReadContent.read #全部读取
268
+ @contentPartArray << currentFileContent
269
+ @bufferLength=@bufferLength+ currentFileContent.length #记录缓冲区总长度
270
+ # @contentString= @contentString + fileToReadContent.read #全部读取。
271
+
272
+ assessDiskFlush(layer) #考虑是否要向磁盘先输出内容
273
+ elsif (isSymLink) #是符号链接
274
+ linkTarget=directoryPathName.readlink #获取链接目标
275
+
276
+ # 待续,设置内容长度。符号链接字符串的长度
277
+ packagedFile['file_length']=linkTarget.to_s.bytesize #记录文件的内容长度。
278
+
279
+ #读取文件内容:
280
+ # fileToReadContent=File.new(directoryPath,"rb") #创建文件。
281
+ currentFileContent=StringIO.new(linkTarget.to_s).binmode.read #全部读取。
282
+ @contentPartArray << currentFileContent #加入数组
283
+ @bufferLength=@bufferLength + currentFileContent.length #记录缓冲区总长度
284
+ # @contentString= @contentString + StringIO.new(linkTarget.to_s).binmode.read #全部读取。
285
+
286
+ assessDiskFlush(layer) #考虑是否要向磁盘先输出内容
287
+
288
+ else #是目录。
289
+ # contentString="" #容纳内容的字符串。
290
+ subFileStartIndex=startIndex #子文件的起始位置,以此目录的起始位置为基准。
291
+
292
+ packagedFile['file_length']=0 #本目录的内容长度。
293
+
294
+ directoryPathName.each_child do |subFile| #一个个文件地处理。
295
+ # puts("sub file: #{subFile}, class: #{subFile.class}, symlink: #{subFile.symlink?}, expand_path: #{subFile.expand_path}, file?: #{subFile.file?}") #Debug.
296
+ # checkMemoryUsage(221)
297
+ realPath=subFile.expand_path #获取绝对路径。
303
298
 
304
- # puts("302, contentString: #{contentString}, nil?: #{contentString.nil?}, direcotry path: #{directoryPath}, layer: #{layer}") #Debug
305
-
306
- contentToResult="" #要返回的内容
307
-
308
- if (layer==0) #是最外层
309
- assessDiskFlush(layer, true) #考虑是否要向磁盘先输出内容
310
-
311
- if (@diskFlush) #要向磁盘写入缓存内容
312
- else #不向磁盘写入缓存内容
313
- contentToResult=@contentPartArray.join #重新合并成字符串
314
-
315
- end #if (@diskFlush) #要向磁盘写入缓存内容
316
-
317
- end #if (layer==0) #是最外层
299
+ packagedSubFile,subFileContent=checkOnce(realPath,subFileStartIndex, layer+1) #打包这个子文件。
300
+
301
+ packagedFile['sub_files'] << packagedSubFile #加入到子文件列表中。
302
+
303
+ # puts("sub file content: #{subFileContent}, nil?: #{subFileContent.nil?}" ) #Debug
304
+
305
+ # puts(" content: #{contentString}, nil?: #{contentString.nil? }") #Debug
318
306
 
307
+ # contentString = contentString + subFileContent #串接文件内容。
308
+
309
+ assessDiskFlush(layer) #考虑是否要向磁盘先输出内容
310
+
311
+
312
+ subFileStartIndex+=packagedSubFile['file_length'] #记录打包的子文件的长度,更新下一个要打包的子文件的起始位置。
313
+
314
+ # puts("237, content string length: #{contentString.length}") #Debug
315
+
316
+ packagedFile['file_length']+=packagedSubFile['file_length'] #随着子文件的打包而更新本目录的总长度。
317
+ end #directoryPathName.each_child do |subFile| #一个个文件地处理。
318
+ end #if (isFile) #是文件,不用再列出其子文件了。
319
+
320
+ # puts("300, contentString: #{contentString}, nil?: #{contentString.nil?}, direcotry path: #{directoryPath}, layer: #{layer}") #Debug
321
+
322
+
323
+ # puts("302, contentString: #{contentString}, nil?: #{contentString.nil?}, direcotry path: #{directoryPath}, layer: #{layer}") #Debug
324
+
325
+ contentToResult="" #要返回的内容
326
+
327
+ if (layer==0) #是最外层
328
+ assessDiskFlush(layer, true) #考虑是否要向磁盘先输出内容
329
+
330
+ if (@diskFlush) #要向磁盘写入缓存内容
331
+ else #不向磁盘写入缓存内容
332
+ contentToResult=@contentPartArray.join #重新合并成字符串
319
333
 
320
- return packagedFile, contentToResult #返回打包之后的对象。和文件内容字节数组。
321
- end #def downloadOne #下载一个视频。
334
+ end #if (@diskFlush) #要向磁盘写入缓存内容
335
+ end #if (layer==0) #是最外层
336
+ return packagedFile, contentToResult #返回打包之后的对象。和文件内容字节数组。
337
+ end #def downloadOne #下载一个视频。
322
338
  end
323
339
 
@@ -9,7 +9,10 @@ else #指定了命令行参数。
9
9
 
10
10
  $clipDownloader=VictoriaFresh.new #创建下载器。
11
11
 
12
- $clipDownloader.diskFlush=false #不向磁盘写入缓存
12
+ $clipDownloader.diskFlush=true #向磁盘写入缓存
13
+ $clipDownloader.diskMultiFile=true #写多个磁盘文件
14
+ $clipDownloader.diskFileName='victoriafreshdata.v.' #磁盘文件名前缀
15
+ $clipDownloader.diskFlushSize=32*1024*1024 #磁盘文件大小
13
16
 
14
17
  victoriaFresh,victoriaFreshData=$clipDownloader.checkOnce($rootPath) #打包该目录树。
15
18
 
@@ -24,7 +27,7 @@ else #指定了命令行参数。
24
27
 
25
28
  victoriaFreshFile.close #关闭文件。
26
29
 
27
- victoriaFreshDataFile=File.new("victoriafreshdata.v","wb") #数据文件。
28
- victoriaFreshDataFile.syswrite(victoriaFreshData) #写入文件。
29
- victoriaFreshDataFile.close #关闭文件。
30
+ # victoriaFreshDataFile=File.new("victoriafreshdata.v","wb") #数据文件。
31
+ # victoriaFreshDataFile.syswrite(victoriaFreshData) #写入文件。
32
+ # victoriaFreshDataFile.close #关闭文件。
30
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: VictoriaFreSh
3
3
  version: !ruby/object:Gem::Version
4
- version: 2021.4.17
4
+ version: 2021.4.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hxcan Cai