--- filetree.module	Fri Jan 25 09:15:11 2013
+++ filetree.module.1	Mon Dec 02 10:53:02 2013
@@ -168,6 +168,53 @@
   return $text;
 }
 
+
+/** 
+* Converts bytes into human readable file size. 
+* 
+* @param string $bytes 
+* @return string human readable file size (2,87 ??)
+* @author Mogilev Arseny 
+*/ 
+function _filetree_filesizeconvert($bytes)
+{
+    $bytes = floatval($bytes);
+        $arBytes = array(
+            0 => array(
+                "UNIT" => "TB",
+                "VALUE" => pow(1024, 4)
+            ),
+            1 => array(
+                "UNIT" => "GB",
+                "VALUE" => pow(1024, 3)
+            ),
+            2 => array(
+                "UNIT" => "MB",
+                "VALUE" => pow(1024, 2)
+            ),
+            3 => array(
+                "UNIT" => "KB",
+                "VALUE" => 1024
+            ),
+            4 => array(
+                "UNIT" => "B",
+                "VALUE" => 1
+            ),
+        );
+
+    foreach($arBytes as $arItem)
+    {
+        if($bytes >= $arItem["VALUE"])
+        {
+            $result = $bytes / $arItem["VALUE"];
+            $result = str_replace(".", "," , strval(round($result, 2)))." ".$arItem["UNIT"];
+            break;
+        }
+    }
+    return $result;
+}
+
+
 /**
  * Recursively lists folders and files in this directory.
  * 
@@ -195,6 +242,8 @@
           );
         }
         else {
+	 $size = _filetree_filesizeconvert(filesize($filename));
+	 $file = $file . " (" . $size . ")";
           $name = isset($descriptions[$file]) ? $descriptions[$file] : token_replace($params['filename'], array('file' => $file));
           $url = $params['absolute'] ? file_create_url($filename) : substr(file_create_url($filename), strlen($GLOBALS['base_url'] . '/'));
           $files[$file] = array(

