MCPcopy Create free account
hub / github.com/bajrangCoder/setu / create_folder

Method create_folder

src/entities/collections.rs:516–539  ·  view source on GitHub ↗
(
        &mut self,
        collection_id: Uuid,
        parent_folder_id: Option<Uuid>,
        name: &str,
        cx: &mut Context<Self>,
    )

Source from the content-addressed store, hash-verified

514 /// to rebuild their virtualized snapshots only when the source data changes.
515 pub fn revision(&self) -> u64 {
516 self.revision
517 }
518
519 pub fn create_collection(&mut self, name: &str, cx: &mut Context<Self>) -> Uuid {
520 let collection = Collection::new(name);
521 let id = collection.id;
522 self.collections.push(collection);
523 self.bump_revision();
524 self.save_to_file();
525 cx.emit(CollectionsEvent::CollectionAdded(id));
526 cx.notify();
527 id
528 }
529
530 pub fn import_collection(
531 &mut self,
532 imported: ImportedCollection,
533 cx: &mut Context<Self>,
534 ) -> Uuid {
535 let collection = Collection {
536 id: Uuid::new_v4(),
537 name: imported.name,
538 nodes: imported
539 .nodes
540 .into_iter()
541 .map(CollectionNode::from_imported_node)
542 .collect(),

Callers 1

Calls 2

insert_nodeFunction · 0.85
save_to_fileMethod · 0.45

Tested by

no test coverage detected