Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var App = cli.Command{ Name: "fs", Aliases: nil, Usage: "", UsageText: "", Description: "File System tool", ArgsUsage: "", Category: "", BashComplete: nil, Before: nil, After: nil, Action: nil, OnUsageError: nil, Flags: []cli.Flag{}, Subcommands: []*cli.Command{ { Name: "scan", Aliases: nil, Usage: "", UsageText: "", Description: "Scan a file or directory and output file system metadata as JSON or CSV", ArgsUsage: "", Category: "", BashComplete: nil, Before: nil, After: nil, Action: scan, OnUsageError: nil, Flags: []cli.Flag{ &cli.StringFlag{ Name: "path", Usage: "path to a file or directory to scan", Required: true, }, &cli.StringFlag{ Name: "output-format", Usage: "output format (json or csv)", Required: true, }, &cli.StringSliceFlag{ Name: "skip-path", Usage: "path to a file or directory to exclude from the scan (repeatable)", Required: false, }, &cli.StringSliceFlag{ Name: "skip-regex", Usage: "regular expression matched against file/directory base names to skip (repeatable)", Required: false, }, &cli.StringSliceFlag{ Name: "skip-field", Usage: "exclude a metadata field from the output", Required: false, }, &cli.BoolFlag{ Name: "recursive", Usage: "recursively scan directories", Required: false, }, }, }, { Name: "table", Aliases: nil, Usage: "", UsageText: "", Description: "Render scanned file system metadata as an interactive HTML table", ArgsUsage: "", Category: "", BashComplete: nil, Before: nil, After: nil, Action: table, OnUsageError: nil, Flags: []cli.Flag{ &cli.StringFlag{ Name: "input", Usage: "path to the JSON file produced by the scan command", Required: false, }, &cli.BoolFlag{ Name: "http", Usage: "serve the HTML table over HTTP on localhost (see --http-port)", Required: false, }, &cli.IntFlag{ Name: "http-port", Usage: "port to listen on when --http is enabled", Required: false, Value: port, }, &cli.StringSliceFlag{ Name: "display-field", Usage: "field to include in the table (defaults to all fields present in input)", Required: false, }, &cli.StringSliceFlag{ Name: "heat-map-field", Usage: "a field to use for temperature indication", Required: false, }, &cli.StringSliceFlag{ Name: "exclude-date-field", Usage: "date field to filter on when excluding rows (e.g. createdAt, modifiedAt)", Required: false, }, &cli.StringSliceFlag{ Name: "exclude-date-value", Usage: "date prefix to exclude rows by; accepts YYYY, YYYY-MM, or YYYY-MM-DD (e.g. 2024, 2024-03, 2024-03-15)", Required: false, }, }, }, }, }
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct {
File string `json:"file"`
CreatedAt string `json:"createdAt"`
ModifiedAt string `json:"modifiedAt"`
AccessedAt string `json:"accessedAt"`
ChangedAt string `json:"changedAt"`
Size int64 `json:"size"`
Lines int `json:"lines"`
Mode string `json:"mode"`
IsLink bool `json:"isLink"`
IsDir bool `json:"isDir"`
}
Click to show internal directories.
Click to hide internal directories.