lib/apis/filesystem_api.rb in daftos-0.2.0 vs lib/apis/filesystem_api.rb in daftos-0.3.0

- old
+ new

@@ -39,10 +39,12 @@ dir.each do |name| begin f = File.new("#{dir.path}/#{name}") files << file_info(f) rescue + #puts "error" + #puts e end end ret[:contents] = files end ret @@ -60,9 +62,10 @@ ret[:is_dir] = false ret[:bytes] = file.size ret[:client_mtime] = file.mtime ret[:modified] = file.ctime ret[:mime_type] = Rack::Mime.mime_type("." + file.path.split('.').last) + ret[:binary] = File.binary?(ret[:absolute_path]) ret end end