Crate owtree

Crate owtree 

Source
Expand description

owtreeRust version

§show the directory structure for owserver

owtree a tool in the 1-wire file system OWFS

This Rust version of owtree is part of owrust – the Rust language OWFS programs

§PURPOSE

Show the 1-wire directory structure and devices. Similar to the unix tree program.

§SYNTAX

owtree [OPTIONS] PATH

§OPTIONS

  • -s IP:port (default localhost:4304)
  • --dir Add trailing / for directory elements
  • --bare Suppress non-device entries
  • --prune Even more spare output suppressing convenience files like id and crc
  • -h for full list of options

§PATH

  • 1-wire path
  • default is root /
  • more than one path can be given

§USAGE

  • owserver must be running in a network-accessible location
  • owtree is a command line program
  • output to stdout
  • errors to stderr
  • can be “piped” to uther programs like less and grep

§EXAMPLE

§Read root 1-wire directory

owtree -s localhost:4304 | head -30
/
├── 10.67C6697351FF
│   ├── address
│   ├── alias
│   ├── crc8
│   ├── errata
│   │   ├── die
│   │   ├── trim
│   │   ├── trimblanket
│   │   └── trimvalid
│   ├── family
│   ├── id
│   ├── latesttemp
│   ├── locator
│   ├── power
│   ├── r_address
│   ├── r_id
│   ├── r_locator
│   ├── scratchpad
│   ├── temperature
│   ├── temphigh
│   ├── templow
│   └── type
├── 05.4AEC29CDBAAB
│   ├── PIO
│   ├── address
│   ├── alias
│   ├── crc8
│   ├── family
│   ├── id
...

There is a lot of virtual information included

  • Everything is mirrored in the bus.x directories
  • an a mirror in uncached
  • Total line count owtree | wc -l = 6582

§Read bare root 1-wire directory

owtree -s localhost:4304 --bare | head -30
/
├── 10.67C6697351FF
│   ├── address
│   ├── alias
│   ├── crc8
│   ├── errata
│   │   ├── die
│   │   ├── trim
│   │   ├── trimblanket
│   │   └── trimvalid
│   ├── family
│   ├── id
│   ├── latesttemp
│   ├── locator
│   ├── power
│   ├── r_address
│   ├── r_id
│   ├── r_locator
│   ├── scratchpad
│   ├── temperature
│   ├── temphigh
│   ├── templow
│   └── type
├── 05.4AEC29CDBAAB
│   ├── PIO
│   ├── address
│   ├── alias
│   ├── crc8
│   ├── family
│   ├── id
...
  • No virtual information included (not apparent in the snippet above)
  • Total line count owtree --bare | wc -l = 36

§Read pruned root 1-wire directory

owtree -s localhost:4304 --prune | head -30
/
├── 10.67C6697351FF
│   ├── alias
│   ├── errata
│   │   ├── die
│   │   ├── trim
│   │   ├── trimblanket
│   │   └── trimvalid
│   ├── latesttemp
│   ├── power
│   ├── scratchpad
│   ├── temperature
│   ├── temphigh
│   └── templow
└── 05.4AEC29CDBAAB
    ├── PIO
    ├── alias
    └── sensed
  • --prune also triggers --bare automatically
  • No virtual information included
  • Convenience files (e.g. id) are suppressed
  • Total line count owtree --bare | wc -l = 18

§{c} 2025 Paul H Alfille – MIT Licence

Structs§

Dir 🔒
File 🔒

Constants§

END 🔒
NEXT 🔒
RGT 🔒
TAB 🔒

Functions§

from_path 🔒
main 🔒