Skip to content

Commit

Permalink
misc: Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
antangelo committed Jun 10, 2023
1 parent d528211 commit c5439ea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ $ xdvdfs unpack <path to image> [optional output path]
A simple example reading a file from a given path is:

```rust
fn read_from_path(xiso: &Path, file_path: &str) -> Box<[u8]> {
async fn read_from_path(xiso: &Path, file_path: &str) -> Box<[u8]> {
let mut xiso = std::fs::File::open(xiso).unwrap();
let volume = xdvdfs::read::read_volume(&mut xiso).unwrap();
let volume = xdvdfs::read::read_volume(&mut xiso).await.unwrap();

let file_dirent = volume.root_table.walk_path(&mut xiso, file_path).unwrap();
let file_dirent = volume.root_table.walk_path(&mut xiso, file_path).await.unwrap();

let data = file_dirent.node.dirent.read_data_all(&mut xiso).unwrap();
let data = file_dirent.node.dirent.read_data_all(&mut xiso).await.unwrap();
data
}
```
Expand Down
8 changes: 4 additions & 4 deletions xdvdfs-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
A simple example reading a file from a given path is:

```rust
fn read_from_path(xiso: &Path, file_path: &str) -> Box<[u8]> {
async fn read_from_path(xiso: &Path, file_path: &str) -> Box<[u8]> {
let mut xiso = std::fs::File::open(xiso).unwrap();
let volume = xdvdfs::read::read_volume(&mut xiso).unwrap();
let volume = xdvdfs::read::read_volume(&mut xiso).await.unwrap();

let file_dirent = volume.root_table.walk_path(&mut xiso, file_path).unwrap();
let file_dirent = volume.root_table.walk_path(&mut xiso, file_path).await.unwrap();

let data = file_dirent.node.dirent.read_data_all(&mut xiso).unwrap();
let data = file_dirent.node.dirent.read_data_all(&mut xiso).await.unwrap();
data
}
```
Expand Down

0 comments on commit c5439ea

Please sign in to comment.