dir_utils 1.0.0 copy "dir_utils: ^1.0.0" to clipboard
dir_utils: ^1.0.0 copied to clipboard

A Dart package to add handy methods to Directory class

Makes directory traversal easier. No need to worry about path concatenation and stuff.

Getting started #

Add dir_utils as a dependency in the pubspec.yaml file. Or run dart pub add dir_utils/flutter pub add dir_utils

Usage #

import the package

import 'package:dir_utils/dir_utils.dart';

Go deep in dirs

final Directory myDir = Directory.current
      .dir('very')
      .dir('deep')
      .dir('nested')
      .dir('dir');

Get file of a Directory

final File myFile = Directory.current.file('myFile.json');

Get the files of a Directory

final List<File> myFiles = Directory.current.getFiles().toList();

Get the name of a FileSystemEntity

final String currentDirName = Directory.current.name;
0
likes
160
points
20
downloads

Publisher

unverified uploader

Weekly Downloads

A Dart package to add handy methods to Directory class

Homepage
Repository (GitHub)

Documentation

API reference

License

MIT (license)

More

Packages that depend on dir_utils