Skip to content
pubscout

path

1.9.1, released 2 years ago by dart.dev

A string-based path manipulation library supporting Windows, POSIX, and the web.

WASM-readyQuiet but busy
$ flutter pub add path
Source repository

What it does

Provides common operations for manipulating paths such as joining, splitting, and normalizing. It works with path strings rather than first-class path objects, automatically adapting to the host platform or a specific explicitly chosen style.

AI-written summary of version 1.9.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to manipulate file paths or URLs cross-platform in Dart.
  • You want to join, split, or normalize path strings safely across Windows, POSIX, and the browser.

Skip it when

  • You prefer strongly-typed path objects instead of string-based path handling.

Strengths

  • Solid support for Windows, POSIX (Linux and Mac OS X), and the web.
  • Well-tested and used by many Dart packages for high stability.

Weaknesses

  • Treats paths as strings instead of first-class path objects.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0
import 'package:path/path.dart' as p;

void main() {
  var fullPath = p.join('directory', 'file.txt');
}

Alternatives

Packages that do the same job and could replace path.

  • path_provider

    If you need to find commonly used locations on the filesystem such as temporary or documents directories.

Works with

Packages commonly used together with path: ones it builds on, ones built on it, and its own family.