Skip to content
Snippets Groups Projects
Commit 18e776fa authored by Michael Gapczynski's avatar Michael Gapczynski
Browse files

Changed mount point to 'Share', fixed is_dir()

parent 4e7d1c37
No related branches found
No related tags found
No related merge requests found
......@@ -58,9 +58,14 @@ class OC_FILESTORAGE_SHARED {
}
}
// TODO add all files from db in array
public function opendir($path) {
global $FAKEDIRS;
$FAKEDIRS['shared'] = array(0 => 'test.txt');
$sharedItems = OC_SHARE::getItemsSharedWith();
foreach ($sharedItems as $item) {
$files[] = $item['target'];
}
$FAKEDIRS['shared'] = $files;
return opendir('fakedir://shared');
}
......@@ -83,6 +88,8 @@ class OC_FILESTORAGE_SHARED {
return $storage->is_file(self::getInternalPath($source));
}
}
// TODO fill in other components of array
public function stat($path) {
if ($path == "" || $path == "/") {
$stat["dev"] = "";
......@@ -110,7 +117,7 @@ class OC_FILESTORAGE_SHARED {
public function filetype($path) {
if ($path == "" || $path == "/") {
return "httpd/unix-directory";
return "dir";
} else {
$source = OC_SHARE::getSource($path);
if ($source) {
......@@ -123,6 +130,7 @@ class OC_FILESTORAGE_SHARED {
// TODO Get size of shared directory
public function filesize($path) {
echo "filesize";
if ($path == "" || $path == "/") {
return 10000;
} else {
......
......@@ -158,8 +158,9 @@ class OC_UTIL {
// }
OC_FILESYSTEM::mount($rootStorage,'/');
// TODO add this storage provider in a proper way
$sharedStorage = OC_FILESYSTEM::createStorage('shared',array('datadir'=>$CONFIG_DATADIRECTORY));
OC_FILESYSTEM::mount($sharedStorage,'MTGap/files/Test/');
OC_FILESYSTEM::mount($sharedStorage,'MTGap/files/Share/');
$CONFIG_DATADIRECTORY = "$CONFIG_DATADIRECTORY_ROOT/$user/$root";
if( !is_dir( $CONFIG_DATADIRECTORY )){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment