Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions console_backend/src/bin/fileio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,26 @@ fn main() -> Result<()> {
fileio <SRC> <DEST>
fileio --list <SRC>
fileio --delete <SRC>

TCP Examples:
- List files on Piksi:
fileio --list 192.168.0.222:/data/
- Read file from Piksi:
fileio 192.168.0.222:/persistent/config.ini ./config.ini
- Write file to Piksi:
fileio ./config.ini 192.168.0.222:/persistent/config.ini
- Delete file from Piksi:
fileio --delete 192.168.0.222:/persistent/unwanted_file

Serial Examples:
- List files on Piksi:
fileio --list /dev/ttyUSB0:/data/
- Read file from Piksi:
fileio /dev/ttyUSB0:/persistent/config.ini ./config.ini
- Write file to Piksi:
fileio ./config.ini /dev/ttyUSB0:/persistent/config.ini
- Delete file from Piksi:
fileio --delete /dev/ttyUSB0:/persistent/unwanted_file
"
)]
struct Opts {
Expand Down
3 changes: 1 addition & 2 deletions console_backend/src/fileio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ impl Fileio {
}

pub fn read(&mut self, path: String, dest: impl Write + Send) -> Result<()> {
self.read_with_progress(path, dest, |_| ())?;
Ok(())
self.read_with_progress(path, dest, |_| ())
}

pub fn read_with_progress<F>(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah looks like I was just beaten to the punch with this one, I'll back off haha

Expand Down