async fn tempfile(dir: &path::Path) -> Result<(afs::File, path::PathBuf)> {
    let tmppath = crate::tmp::tmppath_in(dir);
    let tmp = afs::OpenOptions::new()
        .write(true)
        .create(true)
        .truncate(true)
        .open(&tmppath)
        .await
        .map_err(ForcepError::Io)?;
    Ok((tmp, tmppath))
}
/// Creates a writeable and persistent temporary file in the path provided, returning the path and
/// file handle.
Creates a writeable and persistent temporary file in the path provided, returning the path and
file handle.
Creates a writeable and persistent temporary file in the path provided returning the path and file handle .
async fn tempfile(dir: &path::Path) -> Result<(afs::File, path::PathBuf)> {
    let tmppath = crate::tmp::tmppath_in(dir);
    let tmp = afs::OpenOptions::new()
        .write(true)
        .create(true)
        .truncate(true)
        .open(&tmppath)
        .await
        .map_err(ForcepError::Io)?;
    Ok((tmp, tmppath))
}
async fn tempfile ( dir : & path :: Path ) -> Result < ( afs :: File , path :: PathBuf ) > { let tmppath = crate :: tmp :: tmppath_in ( dir ) ; let tmp = afs :: OpenOptions :: new ( ) . write ( true ) . create ( true ) . truncate ( true ) . open ( & tmppath ) . await . map_err ( ForcepError :: Io ) ? ; Ok ( ( tmp , tmppath ) ) }
Creates a writeable and persistent temporary file in the path provided, returning the path and
file handle.
Creates a writeable and persistent temporary file in the path provided returning the path and file handle .
dir
&path::Path
dir
&path::Path