filehandler: implement getSize

Implement the getSize command to return current information about any
staged files.

Change-Id: I3bbc8dfe16e008e18c59f2b9281186319983006c
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/file_handler.cpp b/file_handler.cpp
index d47e222..bab8bf1 100644
--- a/file_handler.cpp
+++ b/file_handler.cpp
@@ -17,12 +17,14 @@
 #include "file_handler.hpp"
 
 #include <cstdint>
+#include <experimental/filesystem>
 #include <memory>
 #include <string>
 #include <vector>
 
 namespace blobs
 {
+namespace fs = std::experimental::filesystem;
 
 bool FileHandler::open(const std::string& path)
 {
@@ -90,7 +92,14 @@
 
 int FileHandler::getSize()
 {
-    /* TODO: implement (maybe just stat on the file). */
+    try
+    {
+        return static_cast<int>(fs::file_size(filename));
+    }
+    catch (const fs::filesystem_error& e)
+    {
+    }
+
     return 0;
 }