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

Method files

rust/src/collaboration/project.rs:216–227  ·  view source on GitHub ↗

Get the list of files in this project. NOTE: If the project has not been opened, it will be opened upon calling this. NOTE: If folders have not been pulled, they will be pulled upon calling this. NOTE: If files have not been pulled, they will be pulled upon calling this.

(&self)

Source from the content-addressed store, hash-verified

214 /// NOTE: If folders have not been pulled, they will be pulled upon calling this.
215 /// NOTE: If files have not been pulled, they will be pulled upon calling this.
216 pub fn files(&self) -> Result<Array<RemoteFile>, ()> {
217 // TODO: This sync should be removed?
218 if !self.has_pulled_files() {
219 self.pull_files()?;
220 }
221
222 let mut count = 0;
223 let result = unsafe { BNRemoteProjectGetFiles(self.handle.as_ptr(), &mut count) };
224 (!result.is_null())
225 .then(|| unsafe { Array::new(result, count, ()) })
226 .ok_or(())
227 }
228
229 /// Get a specific File in the Project by its id
230 ///

Callers

nothing calls this directly

Calls 2

has_pulled_filesMethod · 0.45
pull_filesMethod · 0.45

Tested by

no test coverage detected