Skip to content
jc-rs
GitHub

dir

--dirv1.5.0

Windows `dir` command parser

Windowscommandslurpable
$ dir | jc-rs --dir

A real pair

From the reference corpus (windows-10/dir-files.json). The left pane is the input the fixture ships; the right pane is the corpus's expected JSON. CI compares jc-rs with it field by field under the published differential. Hover a value to see where it came from.

dirwindows-10
 Volume in drive C has no label.
 Volume Serial Number is 246B-3B5A

 Directory of C:\Users\Yoda\Desktop\jc

03/25/2021  02:38 PM             4,253 docgen.sh

 Directory of C:\Users\Yoda\Desktop\jc

03/25/2021  02:36 PM             1,088 LICENSE.md

 Directory of C:\Users\Yoda\Desktop\jc

03/25/2021  02:36 PM            27,063 README.md
               3 File(s)         32,404 bytes
               0 Dir(s)  33,349,652,480 bytes free
expected outputjson
Use the Left and Right arrow keys to highlight the matching value in the input.
[
  {
    "date": "03/25/2021",
    "time": "02:38 PM",
    "dir": false,
    "size": 4253,
    "filename": "docgen.sh",
    "parent": "C:\\Users\\Yoda\\Desktop\\jc",
    "epoch": 1616708280
  },
  {
    "date": "03/25/2021",
    "time": "02:36 PM",
    "dir": false,
    "size": 1088,
    "filename": "LICENSE.md",
    "parent": "C:\\Users\\Yoda\\Desktop\\jc",
    "epoch": 1616708160
  },
  {
    "date": "03/25/2021",
    "time": "02:36 PM",
    "dir": false,
    "size": 27063,
    "filename": "README.md",
    "parent": "C:\\Users\\Yoda\\Desktop\\jc",
    "epoch": 1616708160
  }
]

Fixture coverage

7/7oracle-valid pairs match under the published structural JSON comparison

Magic syntax

jc-rs dirjc-rs runs the command itself and parses what it prints. Recognised for: `dir`

Source: crates/jc-rs-parsers/src/misc/dir.rs. jc-rs targets the schemas defined by the original Python tool. Fixture coverage above is the measured evidence for this parser; test the inputs your pipeline depends on. Compare