pub struct ProjectBulkOperationLock<'a> { /* private fields */ }
Implementations§
Methods from Deref<Target = Project>§
sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Get the description of the project
sourcepub fn set_description(&self, value: &str)
pub fn set_description(&self, value: &str)
Set the description of the project
sourcepub fn query_metadata(&self, key: &str) -> Ref<Metadata>
pub fn query_metadata(&self, key: &str) -> Ref<Metadata>
Retrieves metadata stored under a key from the project
sourcepub fn store_metadata(&self, key: &str, value: &Metadata) -> bool
pub fn store_metadata(&self, key: &str, value: &Metadata) -> bool
Stores metadata within the project,
key
- Key under which to store the Metadata objectvalue
- Object to store
sourcepub fn remove_metadata(&self, key: &str)
pub fn remove_metadata(&self, key: &str)
Removes the metadata associated with this key
from the project
pub fn push_folder(&self, file: &ProjectFolder)
sourcepub fn create_folder_from_path(
&self,
path: &str,
parent: Option<&ProjectFolder>,
description: &str,
) -> Result<Ref<ProjectFolder>, ()>
pub fn create_folder_from_path( &self, path: &str, parent: Option<&ProjectFolder>, description: &str, ) -> Result<Ref<ProjectFolder>, ()>
Recursively create files and folders in the project from a path on disk
path
- Path to folder on diskparent
- Parent folder in the project that will contain the new contentsdescription
- Description for created root folder
sourcepub fn create_folder_from_path_with_progress<PC>(
&self,
path: &str,
parent: Option<&ProjectFolder>,
description: &str,
progress: PC,
) -> Result<Ref<ProjectFolder>, ()>where
PC: ProgressCallback,
pub fn create_folder_from_path_with_progress<PC>(
&self,
path: &str,
parent: Option<&ProjectFolder>,
description: &str,
progress: PC,
) -> Result<Ref<ProjectFolder>, ()>where
PC: ProgressCallback,
Recursively create files and folders in the project from a path on disk
path
- Path to folder on diskparent
- Parent folder in the project that will contain the new contentsdescription
- Description for created root folderprogress
-ProgressCallback
that will be called as theProjectFolder
is being created
sourcepub fn create_folder(
&self,
parent: Option<&ProjectFolder>,
name: &str,
description: &str,
) -> Result<Ref<ProjectFolder>, ()>
pub fn create_folder( &self, parent: Option<&ProjectFolder>, name: &str, description: &str, ) -> Result<Ref<ProjectFolder>, ()>
Recursively create files and folders in the project from a path on disk
parent
- Parent folder in the project that will contain the new foldername
- Name for the created folderdescription
- Description for created folder
sourcepub unsafe fn create_folder_unsafe(
&self,
parent: Option<&ProjectFolder>,
name: &str,
description: &str,
id: &str,
) -> Result<Ref<ProjectFolder>, ()>
pub unsafe fn create_folder_unsafe( &self, parent: Option<&ProjectFolder>, name: &str, description: &str, id: &str, ) -> Result<Ref<ProjectFolder>, ()>
Recursively create files and folders in the project from a path on disk
parent
- Parent folder in the project that will contain the new foldername
- Name for the created folderdescription
- Description for created folderid
- id unique ID
sourcepub fn folder_by_id(&self, id: &str) -> Option<Ref<ProjectFolder>>
pub fn folder_by_id(&self, id: &str) -> Option<Ref<ProjectFolder>>
Retrieve a folder in the project by unique folder id
sourcepub fn delete_folder(&self, folder: &ProjectFolder) -> Result<(), ()>
pub fn delete_folder(&self, folder: &ProjectFolder) -> Result<(), ()>
Recursively delete a ProjectFolder
from the Project
.
folder
-ProjectFolder
to delete recursively
sourcepub fn delete_folder_with_progress<PC: ProgressCallback>(
&self,
folder: &ProjectFolder,
progress: PC,
) -> Result<(), ()>
pub fn delete_folder_with_progress<PC: ProgressCallback>( &self, folder: &ProjectFolder, progress: PC, ) -> Result<(), ()>
Recursively delete a ProjectFolder
from the Project
.
folder
-ProjectFolder
to delete recursivelyprogress
-ProgressCallback
that will be called as objects get deleted
pub fn push_file(&self, file: &ProjectFile)
sourcepub fn create_file_from_path(
&self,
path: &str,
folder: Option<&ProjectFolder>,
name: &str,
description: &str,
) -> Result<Ref<ProjectFile>, ()>
pub fn create_file_from_path( &self, path: &str, folder: Option<&ProjectFolder>, name: &str, description: &str, ) -> Result<Ref<ProjectFile>, ()>
Create a file in the project from a path on disk
path
- Path on diskfolder
- Folder to place the created file inname
- Name to assign to the created filedescription
- Description to assign to the created file
sourcepub fn create_file_from_path_with_progress<PC>(
&self,
path: &str,
folder: Option<&ProjectFolder>,
name: &str,
description: &str,
progress: PC,
) -> Result<Ref<ProjectFile>, ()>where
PC: ProgressCallback,
pub fn create_file_from_path_with_progress<PC>(
&self,
path: &str,
folder: Option<&ProjectFolder>,
name: &str,
description: &str,
progress: PC,
) -> Result<Ref<ProjectFile>, ()>where
PC: ProgressCallback,
Create a file in the project from a path on disk
path
- Path on diskfolder
- Folder to place the created file inname
- Name to assign to the created filedescription
- Description to assign to the created fileprogress
-ProgressCallback
that will be called as theProjectFile
is being added
sourcepub unsafe fn create_file_from_path_unsafe(
&self,
path: &str,
folder: Option<&ProjectFolder>,
name: &str,
description: &str,
id: &str,
creation_time: SystemTime,
) -> Result<Ref<ProjectFile>, ()>
pub unsafe fn create_file_from_path_unsafe( &self, path: &str, folder: Option<&ProjectFolder>, name: &str, description: &str, id: &str, creation_time: SystemTime, ) -> Result<Ref<ProjectFile>, ()>
Create a file in the project from a path on disk
path
- Path on diskfolder
- Folder to place the created file inname
- Name to assign to the created filedescription
- Description to assign to the created fileid
- id unique IDcreation_time
- Creation time of the file
sourcepub unsafe fn create_file_from_path_unsafe_with_progress<PC>(
&self,
path: &str,
folder: Option<&ProjectFolder>,
name: &str,
description: &str,
id: &str,
creation_time: SystemTime,
progress: PC,
) -> Result<Ref<ProjectFile>, ()>where
PC: ProgressCallback,
pub unsafe fn create_file_from_path_unsafe_with_progress<PC>(
&self,
path: &str,
folder: Option<&ProjectFolder>,
name: &str,
description: &str,
id: &str,
creation_time: SystemTime,
progress: PC,
) -> Result<Ref<ProjectFile>, ()>where
PC: ProgressCallback,
Create a file in the project from a path on disk
path
- Path on diskfolder
- Folder to place the created file inname
- Name to assign to the created filedescription
- Description to assign to the created fileid
- id unique IDcreation_time
- Creation time of the fileprogress
-ProgressCallback
that will be called as theProjectFile
is being created
sourcepub fn create_file(
&self,
contents: &[u8],
folder: Option<&ProjectFolder>,
name: &str,
description: &str,
) -> Result<Ref<ProjectFile>, ()>
pub fn create_file( &self, contents: &[u8], folder: Option<&ProjectFolder>, name: &str, description: &str, ) -> Result<Ref<ProjectFile>, ()>
Create a file in the project
contents
- Bytes of the file that will be createdfolder
- Folder to place the created file inname
- Name to assign to the created filedescription
- Description to assign to the created file
sourcepub fn create_file_with_progress<PC>(
&self,
contents: &[u8],
folder: Option<&ProjectFolder>,
name: &str,
description: &str,
progress: PC,
) -> Result<Ref<ProjectFile>, ()>where
PC: ProgressCallback,
pub fn create_file_with_progress<PC>(
&self,
contents: &[u8],
folder: Option<&ProjectFolder>,
name: &str,
description: &str,
progress: PC,
) -> Result<Ref<ProjectFile>, ()>where
PC: ProgressCallback,
Create a file in the project
contents
- Bytes of the file that will be createdfolder
- Folder to place the created file inname
- Name to assign to the created filedescription
- Description to assign to the created fileprogress
-ProgressCallback
that will be called as theProjectFile
is being created
sourcepub unsafe fn create_file_unsafe(
&self,
contents: &[u8],
folder: Option<&ProjectFolder>,
name: &str,
description: &str,
id: &str,
creation_time: SystemTime,
) -> Result<Ref<ProjectFile>, ()>
pub unsafe fn create_file_unsafe( &self, contents: &[u8], folder: Option<&ProjectFolder>, name: &str, description: &str, id: &str, creation_time: SystemTime, ) -> Result<Ref<ProjectFile>, ()>
Create a file in the project
contents
- Bytes of the file that will be createdfolder
- Folder to place the created file inname
- Name to assign to the created filedescription
- Description to assign to the created fileid
- id unique IDcreation_time
- Creation time of the file
sourcepub unsafe fn create_file_unsafe_with_progress<PC>(
&self,
contents: &[u8],
folder: Option<&ProjectFolder>,
name: &str,
description: &str,
id: &str,
creation_time: SystemTime,
progress: PC,
) -> Result<Ref<ProjectFile>, ()>where
PC: ProgressCallback,
pub unsafe fn create_file_unsafe_with_progress<PC>(
&self,
contents: &[u8],
folder: Option<&ProjectFolder>,
name: &str,
description: &str,
id: &str,
creation_time: SystemTime,
progress: PC,
) -> Result<Ref<ProjectFile>, ()>where
PC: ProgressCallback,
Create a file in the project
contents
- Bytes of the file that will be createdfolder
- Folder to place the created file inname
- Name to assign to the created filedescription
- Description to assign to the created fileid
- id unique IDcreation_time
- Creation time of the fileprogress
-ProgressCallback
that will be called as theProjectFile
is being created
sourcepub fn files(&self) -> Array<ProjectFile>
pub fn files(&self) -> Array<ProjectFile>
Get a list of files in the project
sourcepub fn file_by_id(&self, id: &str) -> Option<Ref<ProjectFile>>
pub fn file_by_id(&self, id: &str) -> Option<Ref<ProjectFile>>
Retrieve a file in the project by unique id
sourcepub fn file_by_path(&self, path: &str) -> Option<Ref<ProjectFile>>
pub fn file_by_path(&self, path: &str) -> Option<Ref<ProjectFile>>
Retrieve a file in the project by the path
on disk
sourcepub fn delete_file(&self, file: &ProjectFile) -> bool
pub fn delete_file(&self, file: &ProjectFile) -> bool
Delete a file from the project