diff options
author | Jan-Christoph Borchardt <JanCBorchardt@fsfe.org> | 2011-08-17 13:48:36 +0200 |
---|---|---|
committer | Jan-Christoph Borchardt <JanCBorchardt@fsfe.org> | 2011-08-17 13:48:36 +0200 |
commit | 683e1250427d75d0d3431c486967059871850d6a (patch) | |
tree | c5b06d8bd2875b5576c675dec9a6bf6476682d85 /lib | |
parent | 0bd92fecec6a3fa1db66a84291317bc6f00fce48 (diff) | |
parent | b7b3a4920341f00e2f544ca7f883a93dab019756 (diff) | |
download | nextcloud-server-683e1250427d75d0d3431c486967059871850d6a.tar.gz nextcloud-server-683e1250427d75d0d3431c486967059871850d6a.zip |
Merge branch 'sharing'
Diffstat (limited to 'lib')
-rw-r--r-- | lib/filesystem.php | 5 | ||||
-rw-r--r-- | lib/util.php | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/filesystem.php b/lib/filesystem.php index 911a85e4a33..76032fae204 100644 --- a/lib/filesystem.php +++ b/lib/filesystem.php @@ -175,7 +175,7 @@ class OC_Filesystem{ * @param string path * @return OC_Filestorage */ - static private function getStorage($path){ + static public function getStorage($path){ $mountpoint=self::getMountPoint($path); if($mountpoint){ return self::$storages[$mountpoint]; @@ -189,7 +189,7 @@ class OC_Filesystem{ * @param string path * @return string */ - static private function getMountPoint($path){ + static public function getMountPoint($path){ if(!$path){ $path='/'; } @@ -214,6 +214,7 @@ class OC_Filesystem{ } return $foundMountPoint; } + /** * return the path to a local version of the file * we need this because we can't know if a file is stored local or not from outside the filestorage and for some purposes a local file is needed diff --git a/lib/util.php b/lib/util.php index 0fdfa012305..f4ca879a9bc 100644 --- a/lib/util.php +++ b/lib/util.php @@ -53,6 +53,10 @@ class OC_Util { // } OC_Filesystem::mount($rootStorage,'/'); + // TODO add this storage provider in a proper way + $sharedStorage = OC_Filesystem::createStorage('shared',array('datadir'=>'/'.OC_User::getUser().'/files/Shared')); + OC_Filesystem::mount($sharedStorage,'/'.OC_User::getUser().'/files/Shared/'); + $CONFIG_DATADIRECTORY = "$CONFIG_DATADIRECTORY_ROOT/$user/$root"; if( !is_dir( $CONFIG_DATADIRECTORY )){ mkdir( $CONFIG_DATADIRECTORY, 0755, true ); |