]> source.dussan.org Git - nextcloud-server.git/commitdiff
improve caching smb results a bit
authorRobin Appelman <icewind@owncloud.com>
Sun, 17 Jun 2012 00:59:38 +0000 (02:59 +0200)
committerRobin Appelman <icewind@owncloud.com>
Sun, 17 Jun 2012 00:59:38 +0000 (02:59 +0200)
apps/files_external/lib/smb.php

index e05d69f784416c4d6ab7e7b6e50f670a04922bb0..9db8e9fd982a4298f547578b1ac211cd668ece69 100644 (file)
@@ -60,6 +60,10 @@ class OC_FileStorage_SMB extends OC_FileStorage_StreamWrapper{
                }
        }
 
+       public function filetype($path){
+               return (bool)$this->opendir($path);//using opendir causes the same amount of requests and caches the content of the folder in one go
+       }
+
        /**
         * check if a file or folder has been updated since $time
         * @param int $time