]> 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>
Tue, 10 Jul 2012 12:20:19 +0000 (14:20 +0200)
apps/files_external/lib/smb.php

index b9bbc0a5236fa19b7e2c7eae5190a7024013149e..801f3d1c8897c2e9ad767a31075612177e9d6fcb 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