Struct dagger_sdk::File
source · pub struct File {
pub proc: Arc<Child>,
pub selection: Selection,
pub conn: ConnectParams,
}Fields§
§proc: Arc<Child>§selection: Selection§conn: ConnectParamsImplementations§
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).