Create a file in the project `contents` - Bytes of the file that will be created `folder` - Folder to place the created file in `name` - Name to assign to the created file `description` - Description to assign to the created file
(
&self,
contents: &[u8],
folder: Option<&ProjectFolder>,
name: N,
description: D,
)
| 493 | /// * `name` - Name to assign to the created file |
| 494 | /// * `description` - Description to assign to the created file |
| 495 | pub fn create_file<N, D>( |
| 496 | &self, |
| 497 | contents: &[u8], |
| 498 | folder: Option<&ProjectFolder>, |
| 499 | name: N, |
| 500 | description: D, |
| 501 | ) -> Result<Ref<ProjectFile>, ()> |
| 502 | where |
| 503 | N: BnStrCompatible, |
| 504 | D: BnStrCompatible, |
| 505 | { |
| 506 | self.create_file_with_progress(contents, folder, name, description, NoProgressCallback) |
| 507 | } |
| 508 | |
| 509 | /// Create a file in the project |
| 510 | /// |