pub struct ProjectFile { /* private fields */ }Implementations§
Source§impl ProjectFile
impl ProjectFile
Sourcepub fn path_on_disk(&self) -> Option<PathBuf>
pub fn path_on_disk(&self) -> Option<PathBuf>
Get the path on disk to this file’s contents
Sourcepub fn path_in_project(&self) -> PathBuf
pub fn path_in_project(&self) -> PathBuf
Get the path in the project to this file’s contents
Sourcepub fn exists_on_disk(&self) -> bool
pub fn exists_on_disk(&self) -> bool
Check if this file’s contents exist on disk
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Get the description of this file
Sourcepub fn set_description(&self, value: &str) -> bool
pub fn set_description(&self, value: &str) -> bool
Set the description of this file
Sourcepub fn creation_time(&self) -> SystemTime
pub fn creation_time(&self) -> SystemTime
Get the file creation time
Sourcepub fn folder(&self) -> Option<Ref<ProjectFolder>>
pub fn folder(&self) -> Option<Ref<ProjectFolder>>
Get the folder that contains this file
Sourcepub fn set_folder(&self, folder: Option<&ProjectFolder>) -> bool
pub fn set_folder(&self, folder: Option<&ProjectFolder>) -> bool
Set the folder that contains this file
Sourcepub fn export(&self, dest: &Path) -> bool
pub fn export(&self, dest: &Path) -> bool
Export this file to disk, `true’ if the export succeeded
dest- Destination file path for the exported contents, passing a directory will append the file name.
Sourcepub fn add_dependency(&self, file: Ref<ProjectFile>) -> bool
pub fn add_dependency(&self, file: Ref<ProjectFile>) -> bool
Add a ProjectFile as a dependency of this file
Sourcepub fn remove_dependency(&self, file: Ref<ProjectFile>) -> bool
pub fn remove_dependency(&self, file: Ref<ProjectFile>) -> bool
Remove a ProjectFile as a dependency of this file
Sourcepub fn get_dependencies(&self) -> Array<ProjectFile>
pub fn get_dependencies(&self) -> Array<ProjectFile>
Get the ProjectFiles that this file depends on
Sourcepub fn get_required_by(&self) -> Array<ProjectFile>
pub fn get_required_by(&self) -> Array<ProjectFile>
Get the ProjectFiles that depend on this file
Trait Implementations§
Source§impl CoreArrayProvider for ProjectFile
impl CoreArrayProvider for ProjectFile
Source§impl Debug for ProjectFile
impl Debug for ProjectFile
Source§impl ToOwned for ProjectFile
impl ToOwned for ProjectFile
Source§type Owned = Ref<ProjectFile>
type Owned = Ref<ProjectFile>
The resulting type after obtaining ownership.
Source§fn to_owned(&self) -> Self::Owned
fn to_owned(&self) -> Self::Owned
Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · Source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Uses borrowed data to replace owned data, usually by cloning. Read more
impl Send for ProjectFile
impl Sync for ProjectFile
Auto Trait Implementations§
impl Freeze for ProjectFile
impl RefUnwindSafe for ProjectFile
impl Unpin for ProjectFile
impl UnwindSafe for ProjectFile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more