merge with master
[platform/framework/web/wrt-plugins-common.git] / src / modules / tizen / Filesystem / Stream.cpp
old mode 100755 (executable)
new mode 100644 (file)
index f999484..f63d7c4
@@ -24,7 +24,6 @@
 
 namespace WrtDeviceApis {
 namespace Filesystem {
-
 using namespace Api;
 
 Stream::Stream(const NodePtr& parent,
@@ -35,9 +34,14 @@ Stream::Stream(const NodePtr& parent,
     Assert(m_parent && "Stream needs to have parent.");
 
     std::ios_base::openmode mode_ = std::ios_base::binary;
-    if (mode & AM_READ) { mode_ |= std::ios_base::in; }
-    if (mode & AM_WRITE) { mode_ |= std::ios_base::out; } else if (mode &
-                                                                   AM_APPEND) {
+    if (mode & AM_READ) {
+        mode_ |= std::ios_base::in;
+    }
+    if (mode & AM_WRITE) {
+        mode_ |= std::ios_base::out;
+    } else if (mode &
+               AM_APPEND)
+    {
         mode_ |= (std::ios_base::app | std::ios_base::out);
     }
 
@@ -237,7 +241,7 @@ IStreamPtr Stream::write_(T arg)
     if (!(m_stream << arg)) {
         LogError("Error while writing to the stream.");
         ThrowMsg(Commons::PlatformException,
-             "Error while writing to the stream.");
+                 "Error while writing to the stream.");
     }
     m_stream.flush();
 
@@ -294,6 +298,5 @@ void Stream::checkForWriting() const
         ThrowMsg(Commons::PlatformException, "Stream is not writeable.");
     }
 }
-
 } // Filesystem
 } // WrtDeviceApis