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

Method create_folder

rust/src/project.rs:225–247  ·  view source on GitHub ↗

Recursively create files and folders in the project from a path on disk `parent` - Parent folder in the project that will contain the new folder `name` - Name for the created folder `description` - Description for created folder

(
        &self,
        parent: Option<&ProjectFolder>,
        name: N,
        description: D,
    )

Source from the content-addressed store, hash-verified

223 /// * `name` - Name for the created folder
224 /// * `description` - Description for created folder
225 pub fn create_folder<N, D>(
226 &self,
227 parent: Option<&ProjectFolder>,
228 name: N,
229 description: D,
230 ) -> Result<Ref<ProjectFolder>, ()>
231 where
232 N: BnStrCompatible,
233 D: BnStrCompatible,
234 {
235 let name_raw = name.into_bytes_with_nul();
236 let description_raw = description.into_bytes_with_nul();
237 let parent_ptr = parent.map(|p| p.handle.as_ptr()).unwrap_or(null_mut());
238 unsafe {
239 let result = BNProjectCreateFolder(
240 self.handle.as_ptr(),
241 parent_ptr,
242 name_raw.as_ref().as_ptr() as *const c_char,
243 description_raw.as_ref().as_ptr() as *const c_char,
244 );
245 Ok(ProjectFolder::ref_from_raw(NonNull::new(result).ok_or(())?))
246 }
247 }
248
249 /// Recursively create files and folders in the project from a path on disk
250 ///

Callers 2

test_project_creationFunction · 0.45
modify_projectFunction · 0.45

Calls 3

into_bytes_with_nulMethod · 0.80
mapMethod · 0.80
as_refMethod · 0.45

Tested by 2

test_project_creationFunction · 0.36
modify_projectFunction · 0.36