Skip to content

Latest commit

 

History

History

ap-storage-linux

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

ap-storage-linux

This crate is part of

storage.pico logo


A read-only adapter to POSIX files for the alpico storage stack.

Not that this crate is not #![no_std] compatible.

Usage

use ap_storage_linux::LinuxDisk;
use ap_storage::Read;

let file = LinuxDisk::new("file.txt", 0);
let mut read_buf = [0u8; 32];
let len = file.read_bytes(0, &mut read_buf)?;
let output = std::str::from_utf8(&read_buf[..len])?;
println!("{output}");