Retrieve a folder in the project by unique folder `id`
(&self, id: S)
| 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>> { |
| 296 | let id_raw = id.into_bytes_with_nul(); |
| 297 | let id_ptr = id_raw.as_ref().as_ptr() as *const c_char; |
| 298 | let result = unsafe { BNProjectGetFolderById(self.handle.as_ptr(), id_ptr) }; |
| 299 | let handle = NonNull::new(result)?; |
| 300 | Some(unsafe { ProjectFolder::ref_from_raw(handle) }) |
| 301 | } |
| 302 | |
| 303 | /// Recursively delete a [`ProjectFolder`] from the [`Project`]. |
| 304 | /// |