+ # Have to defer creating readme_file because at this point we don't
+ # yet have an inode assigned.
+ self.readme_file = None
+
+ def create_readme(self):
+ if self.readme_file is None:
+ text = '''This directory provides access to Arvados collections as subdirectories listed
+by uuid (in the form 'zzzzz-4zz18-1234567890abcde') or portable data hash (in
+the form '1234567890abcdefghijklmnopqrstuv+123').
+
+Note that this directory will appear empty until you attempt to access a
+specific collection subdirectory (such as trying to 'cd' into it), at which
+point the collection will actually be looked up on the server and the directory
+will appear if it exists.
+'''
+ self.readme_file = self.inodes.add_entry(StringFile(self.inode, text, time.time()))
+ self._entries["README"] = self.readme_file