- # Set up the request handler with the 'magic directory' at the root
- operations.inodes.add_entry(MagicDirectory(llfuse.ROOT_INODE, operations.inodes))
- except Exception as ex:
- logging.error("arv-mount: exception during API setup")
- logging.error(traceback.format_exc())
+ e = operations.inodes.add_entry(Directory(llfuse.ROOT_INODE))
+ dir_args[0] = e.inode
+
+ e._entries['by_id'] = operations.inodes.add_entry(MagicDirectory(*dir_args))
+ e._entries['by_tag'] = operations.inodes.add_entry(TagsDirectory(*dir_args))
+
+ dir_args.append(usr)
+ dir_args.append(True)
+ e._entries['home'] = operations.inodes.add_entry(ProjectDirectory(*dir_args))
+ e._entries['shared'] = operations.inodes.add_entry(SharedDirectory(*dir_args))
+
+ text = '''
+Welcome to Arvados! This directory provides file system access to files and objects
+available on the Arvados installation located at '{}'
+using credentials for user '{}'.
+
+From here, the following directories are available:
+
+ by_id/ Access to Keep collections by uuid or portable data hash (see by_id/README for details).
+ by_tag/ Access to Keep collections organized by tag.
+ home/ The contents of your home project.
+ shared/ Projects shared with you.
+'''.format(arvados.config.get('ARVADOS_API_HOST'), usr['email'])
+
+ e._entries["README"] = operations.inodes.add_entry(StringFile(e.inode, text, now))
+
+
+ except Exception:
+ logger.exception("arv-mount: exception during API setup")