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 `id` - id unique ID `creation_time` - Creation time of the file
(
&self,
contents: &[u8],
folder: Option<&ProjectFolder>,
name: N,
description: D,
id: I,
creation_time: SystemTime,
)
| 554 | /// * `id` - id unique ID |
| 555 | /// * `creation_time` - Creation time of the file |
| 556 | pub unsafe fn create_file_unsafe<N, D, I>( |
| 557 | &self, |
| 558 | contents: &[u8], |
| 559 | folder: Option<&ProjectFolder>, |
| 560 | name: N, |
| 561 | description: D, |
| 562 | id: I, |
| 563 | creation_time: SystemTime, |
| 564 | ) -> Result<Ref<ProjectFile>, ()> |
| 565 | where |
| 566 | N: BnStrCompatible, |
| 567 | D: BnStrCompatible, |
| 568 | I: BnStrCompatible, |
| 569 | { |
| 570 | self.create_file_unsafe_with_progress( |
| 571 | contents, |
| 572 | folder, |
| 573 | name, |
| 574 | description, |
| 575 | id, |
| 576 | creation_time, |
| 577 | NoProgressCallback, |
| 578 | ) |
| 579 | } |
| 580 | |
| 581 | /// Create a file in the project |
| 582 | /// |