update
This commit is contained in:
parent
f38432f3bc
commit
f71e52e2c9
@ -56,32 +56,11 @@ class VolumeController < ApplicationController
|
|||||||
i+=1
|
i+=1
|
||||||
end
|
end
|
||||||
puts @files
|
puts @files
|
||||||
end
|
return @files
|
||||||
|
|
||||||
|
|
||||||
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
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def checkDir
|
def checkDir
|
||||||
file_directory(params[:path])
|
files = file_directory(params[:path])
|
||||||
render :json => {:file => @files , :current => @current_dir}
|
render :json => {:file => files , :current => @current_dir}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user