subDir method

Directory subDir(
  1. String part1, [
  2. String? part2,
  3. String? part3,
  4. String? part4,
  5. String? part5,
])

Creates a Directory instance representing a subdirectory in this directory.

Takes up to 5 path components that will be joined together with this directory's path. All components after part1 are optional.

Example:

final dir = Directory('path/to/dir');
final subDir = dir.subDir('foo', 'bar'); // Creates Directory at 'path/to/dir/foo/bar'

Implementation

Directory subDir(
  String part1, [
  String? part2,
  String? part3,
  String? part4,
  String? part5,
]) =>
    Directory(p.join(path, part1, part2, part3, part4, part5));