Add tables to helper

This commit is contained in:
kyg516
2016-09-27 01:53:09 +09:00
parent 397710c882
commit 5685c5ff6e
6 changed files with 132 additions and 109 deletions

View File

@@ -33,8 +33,18 @@ class ApplicationController < ActionController::Base
return df
end
def checkDir
@current_dir = params[:path]
def chdir
@current_dir = params[:next_dir]
puts "current_dir : " + @current_dir
render :json => {:dir => @current_dir}
end
def rmdir
file_name = params[:file_name]
command = String.new
command << "sudo rm -rf #{file_name}"
puts command
`#{command}`
end
end

View File

@@ -26,14 +26,4 @@ class HomeController < ApplicationController
redirect_to '/home/index'
end
def delete_file
file_name = params[:file_name]
# delete file
command = String.new
command << "sudo rm -rf #{file_name}"
puts command
`#{command}`
redirect_to '/home/index'
end
end