Struct dagger_sdk::File
source · pub struct File {
pub proc: Option<Arc<Child>>,
pub selection: Selection,
pub graphql_client: DynGraphQLClient,
}Fields§
§proc: Option<Arc<Child>>§selection: Selection§graphql_client: DynGraphQLClientImplementations§
source§impl File
impl File
sourcepub async fn export(&self, path: impl Into<String>) -> Result<bool>
pub async fn export(&self, path: impl Into<String>) -> Result<bool>
Writes the file to a file path on the host.
Arguments
path- Location of the written directory (e.g., “output.txt”).
sourcepub async fn id(&self) -> Result<FileId>
pub async fn id(&self) -> Result<FileId>
Retrieves the content-addressed identifier of the file.
sourcepub fn with_timestamps(&self, timestamp: isize) -> File
pub fn with_timestamps(&self, timestamp: isize) -> File
Retrieves this file with its created/modified timestamps set to the given time.
Arguments
timestamp- Timestamp to set dir/files in.
Formatted in seconds following Unix epoch (e.g., 1672531199).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl !UnwindSafe for File
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