components method

Iterable<Component> components()

Produces an iterator over the Components of the path.

Implementation

Iterable<Component> components() =>
    isWindows ? WindowsPath(_string).components() : UnixPath(_string).components();