gluster-web-interface/app/controllers/home_controller.rb
2016-09-04 06:29:32 +00:00

18 lines
428 B
Ruby

class HomeController < ApplicationController
def index
config = get_conf
#@current_dir = config["project_path"]
@current_dir = "/mnt"
file_directory(@current_dir)
end
def make_directory
current_dir = params[:current_dir]
directory_name = params[:directory_name]
puts "mkdir #{current_dir}/#{directory_name}"
`mkdir #{current_dir}/#{directory_name}`
redirect_to '/home/index'
end
end