MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / create_project

Method create_project

rust/src/collaboration/remote.rs:350–373  ·  view source on GitHub ↗

Creates a new project on the remote (and pull it). # Arguments `name` - Project name `description` - Project description

(
        &self,
        name: N,
        description: D,
    )

Source from the content-addressed store, hash-verified

348 /// * `name` - Project name
349 /// * `description` - Project description
350 pub fn create_project<N: BnStrCompatible, D: BnStrCompatible>(
351 &self,
352 name: N,
353 description: D,
354 ) -> Result<Ref<RemoteProject>, ()> {
355 // TODO: Do we want this?
356 // TODO: If you have not yet pulled projects you will have never filled the map you will be placing your
357 // TODO: New project in.
358 if !self.has_pulled_projects() {
359 self.pull_projects()?;
360 }
361 let name = name.into_bytes_with_nul();
362 let description = description.into_bytes_with_nul();
363 let value = unsafe {
364 BNRemoteCreateProject(
365 self.handle.as_ptr(),
366 name.as_ref().as_ptr() as *const c_char,
367 description.as_ref().as_ptr() as *const c_char,
368 )
369 };
370 NonNull::new(value)
371 .map(|handle| unsafe { RemoteProject::ref_from_raw(handle) })
372 .ok_or(())
373 }
374
375 /// Create a new project on the remote from a local project.
376 pub fn import_local_project(&self, project: &Project) -> Option<Ref<RemoteProject>> {

Callers 1

temp_project_scopeFunction · 0.45

Calls 5

into_bytes_with_nulMethod · 0.80
mapMethod · 0.80
has_pulled_projectsMethod · 0.45
pull_projectsMethod · 0.45
as_refMethod · 0.45

Tested by 1

temp_project_scopeFunction · 0.36