Get a list of folders in the project
(&self)
| 282 | |
| 283 | /// Get a list of folders in the project |
| 284 | pub fn folders(&self) -> Result<Array<ProjectFolder>, ()> { |
| 285 | let mut count = 0; |
| 286 | let result = unsafe { BNProjectGetFolders(self.handle.as_ptr(), &mut count) }; |
| 287 | if result.is_null() { |
| 288 | return Err(()); |
| 289 | } |
| 290 | |
| 291 | Ok(unsafe { Array::new(result, count, ()) }) |
| 292 | } |
| 293 | |
| 294 | /// Retrieve a folder in the project by unique folder `id` |
| 295 | pub fn folder_by_id<S: BnStrCompatible>(&self, id: S) -> Option<Ref<ProjectFolder>> { |
no outgoing calls