List.php
authorAlan Knowles <alan@akbkhome.com>
Mon, 15 Aug 2011 05:13:06 +0000 (13:13 +0800)
committerAlan Knowles <alan@akbkhome.com>
Mon, 15 Aug 2011 05:13:06 +0000 (13:13 +0800)
List.php

index c2fe75f..da06513 100644 (file)
--- a/List.php
+++ b/List.php
@@ -46,6 +46,11 @@ class Pman_Ftp_List extends Pman
         
         $dh = opendir($fp);
         $ret= array();
+        
+         require_once 'File/MimeType.php';
+        $fm = new File_MimeType();
+      
+        
         while(false !== ($f = readdir($dh))) {
             if (!strlen($f) || $f[0] =='.') {
                 continue;
@@ -65,6 +70,7 @@ class Pman_Ftp_List extends Pman
             $s->name = $f;
             $s->leaf= false;
             $s->mtime= date('Y-m-d H:i:s', $s->mtime);
+            $s->mimetype = $fm->fromFilename($f);
             $ret[$ff] = $s;
         }
         closedir($dh);