Commit b335b28b authored by project's avatar project

--no commit message

--no commit message
parent 3c677d8b
...@@ -28,12 +28,14 @@ router.get('/:id/stats',function (req, res) { ...@@ -28,12 +28,14 @@ router.get('/:id/stats',function (req, res) {
fs.exists(bss_full_path,function(exists){ fs.exists(bss_full_path,function(exists){
if(exists){ if(exists){
var fstat = stats = fs.statSync(bss_full_path);
BinStream.open(bss_full_path,function(err,bss){ BinStream.open(bss_full_path,function(err,bss){
var rd = bss.reader(); var rd = bss.reader();
var obj_stat = { var obj_stat = {
"storagename" : sid, "storagename" : sid,
"count" : rd.count(), "count" : rd.count(),
"filename" : storage_path + ".bss" "filename" : storage_path + ".bss",
"filesize" : fstat.size
} }
bss.close(function(err){ bss.close(function(err){
respHelper.responseOK(obj_stat); respHelper.responseOK(obj_stat);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment