Skip to content

Add touch() fn to File primitive #4

Open
@petehayes102

Description

@petehayes102

Currently the only way to create a new file is to upload one from the local disk. In some cases it would be useful to be able to create a blank file directly on the remote machine.

The function signature will be:

impl File {
//...
    /// Create a blank file on the managed host.
    fn create(&self, host: &mut Host) -> Result<()>;
//...
}

There are several places that this function will need to be added to:

  1. file/mod.rs -> impl File
  2. file/mod.rs -> trait FileTarget
  3. file/ffi.rs -> pub extern "C" fn file_create(...)
  4. All implementation of FileTarget in target/...
  5. Agent repo -> api/file.rs
  6. Examples repo -> Projects for Rust, C and PHP
  7. Tests repo -> Test suites for Rust, C and PHP

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions