path-size-0.1: Utility for reporting file-system sizes.
Safe HaskellNone
LanguageGHC2021

PathSize.Data.Config

Description

Supplies PathSize Config.

Since: 0.1

Synopsis

Config

data Config Source #

Since: 0.1

Constructors

MkConfig 

Fields

  • searchAll :: !Bool

    Whether to search hidden files/directories.

    Since: 0.1

  • maxDepth :: !(Maybe Word16)

    The depth limit of our search. Note that we still need to fully traverse the file system to get accurate data; this argument merely affects what is reported i.e. any depths > d are implicitly included in parent directories, but not directly.

  • exclude :: !(HashSet OsPath)

    Paths to skip.

    Since: 0.1

  • filesOnly :: !Bool

    Whether to limit our search to just files.

    Since: 0.1

  • ignoreDirIntrinsicSize :: !Bool

    If active, this flag ignores the size of the directory itself e.g. 4096 bytes on a typical ext4 filesystem.

    Since: 0.1

  • numPaths :: !(Maybe (Positive Int))

    The number of paths to return.

    Since: 0.1

  • stableSort :: !Bool

    If enabled, sorts by path name after the size. This makes the sort stable, at the cost of performance.

    Since: 0.1

  • strategy :: !Strategy

    The search strategy.

    Since: 0.1

Instances

Instances details
Show Config Source #

Since: 0.1

Instance details

Defined in PathSize.Data.Config

Eq Config Source #

Since: 0.1

Instance details

Defined in PathSize.Data.Config

Methods

(==) :: Config -> Config -> Bool #

(/=) :: Config -> Config -> Bool #

(k ~ A_Lens, a ~ HashSet OsPath, b ~ HashSet OsPath) => LabelOptic "exclude" k Config Config a b Source #

Since: 0.1

Instance details

Defined in PathSize.Data.Config

(k ~ A_Lens, a ~ Bool, b ~ Bool) => LabelOptic "filesOnly" k Config Config a b Source #

Since: 0.1

Instance details

Defined in PathSize.Data.Config

(k ~ A_Lens, a ~ Bool, b ~ Bool) => LabelOptic "ignoreDirIntrinsicSize" k Config Config a b Source #

Since: 0.1

Instance details

Defined in PathSize.Data.Config

(k ~ A_Lens, a ~ Maybe Word16, b ~ Maybe Word16) => LabelOptic "maxDepth" k Config Config a b Source #

Since: 0.1

Instance details

Defined in PathSize.Data.Config

(k ~ A_Lens, a ~ Maybe (Positive Int), b ~ Maybe (Positive Int)) => LabelOptic "numPaths" k Config Config a b Source #

Since: 0.1

Instance details

Defined in PathSize.Data.Config

(k ~ A_Lens, a ~ Bool, b ~ Bool) => LabelOptic "searchAll" k Config Config a b Source #

Since: 0.1

Instance details

Defined in PathSize.Data.Config

(k ~ A_Lens, a ~ Bool, b ~ Bool) => LabelOptic "stableSort" k Config Config a b Source #

Since: 0.1

Instance details

Defined in PathSize.Data.Config

(k ~ A_Lens, a ~ Strategy, b ~ Strategy) => LabelOptic "strategy" k Config Config a b Source #

Since: 0.1

Instance details

Defined in PathSize.Data.Config

defaultConfig :: Config Source #

MkConfig
  { searchAll = True,
    maxDepth = Nothing,
    exclude = [],
    filesOnly = False,
    ignoreDirIntrinsicSize = False,
    numPaths = Just 10,
    strategy = Async
  }

Since: 0.1

Strategy

data Strategy Source #

Describes the path search strategy.

Since: 0.1

Constructors

Sync

No threads.

Since: 0.1

Async

Lightweight threads.

Since: 0.1

AsyncPool

Uses a thread pool.

Since: 0.1

Instances

Instances details
Bounded Strategy Source #

Since: 0.1

Instance details

Defined in PathSize.Data.Config

Enum Strategy Source #

Since: 0.1

Instance details

Defined in PathSize.Data.Config

Show Strategy Source #

Since: 0.1

Instance details

Defined in PathSize.Data.Config

Eq Strategy Source #

Since: 0.1

Instance details

Defined in PathSize.Data.Config

Ord Strategy Source #

Since: 0.1

Instance details

Defined in PathSize.Data.Config

_Sync :: Prism' Strategy () Source #

Since: 0.1

_Async :: Prism' Strategy () Source #

Since: 0.1

Constants

defaultNumPaths :: Positive Int Source #

Default num paths for normal, full search.

Since: 0.1

defaultNumPathsSize :: Positive Int Source #

Default num paths for size search.

Since: 0.1