From f71e52e2c935d292e285138ba92d3d8e6bc6f808 Mon Sep 17 00:00:00 2001 From: bee0005 Date: Sat, 27 Aug 2016 13:23:33 +0000 Subject: [PATCH] update --- app/controllers/volume_controller.rb | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/app/controllers/volume_controller.rb b/app/controllers/volume_controller.rb index 1fb04ed..78114b3 100644 --- a/app/controllers/volume_controller.rb +++ b/app/controllers/volume_controller.rb @@ -56,32 +56,11 @@ class VolumeController < ApplicationController i+=1 end puts @files - end - - - def change_file_directory(dir) - @change_dir = dir - dir_list = `ls #{@change_dir} -l` - parsing_list = dir_list.split("\n") - @change_files = Array.new - file = Hash.new - i = 0 - @change_total_list = parsing_list[0] - for t in 1..(parsing_list.length-1) - parsing_file = parsing_list[t].split(" ") - file["auth"] = parsing_file[0] - file["size"] = parsing_file[4] - file["date"] = parsing_file[5] + " " + parsing_file[6] + " "+ parsing_file[7] - file["name"] = parsing_file[8] - @change_files[i] = file - file = Hash.new - i+=1 - end - puts @change_files + return @files end def checkDir - file_directory(params[:path]) - render :json => {:file => @files , :current => @current_dir} + files = file_directory(params[:path]) + render :json => {:file => files , :current => @current_dir} end end