MCPcopy Create free account
hub / github.com/AppFlowy-IO/AppFlowy-Collab / open

Method open

collab/src/folder/folder.rs:96–107  ·  view source on GitHub ↗
(mut collab: Collab, notifier: Option<FolderNotify>)

Source from the content-addressed store, hash-verified

94
95impl Folder {
96 pub fn open(mut collab: Collab, notifier: Option<FolderNotify>) -> Result<Self, CollabError> {
97 let body = FolderBody::open(&mut collab, notifier)?;
98 let folder = Folder { collab, body };
99 if folder.get_workspace_id().is_none() {
100 // When the folder is opened, the workspace id must be present.
101 Err(CollabError::FolderMissingRequiredData(
102 "missing workspace id".into(),
103 ))
104 } else {
105 Ok(folder)
106 }
107 }
108
109 pub fn create(mut collab: Collab, notifier: Option<FolderNotify>, data: FolderData) -> Self {
110 let body = FolderBody::open_with(&mut collab, notifier, Some(data));

Callers 4

unzip_single_fileFunction · 0.45
sync_unzipFunction · 0.45
unzip_single_fileFunction · 0.45
sync_simple_unzipFunction · 0.45

Calls 2

get_workspace_idMethod · 0.80
validate_require_dataMethod · 0.80

Tested by

no test coverage detected