privatePath function

String privatePath(
  1. String part1, [
  2. String? part2,
  3. String? part3,
  4. String? part4,
  5. String? part5,
  6. String? part6,
  7. String? part7,
])

Removes the users home directory from a path replacing it with ~

Implementation

String privatePath(
  String part1, [
  String? part2,
  String? part3,
  String? part4,
  String? part5,
  String? part6,
  String? part7,
]) {
  final prefix = rootPrefix(HOME);
  return truepath(part1, part2, part3, part4, part5, part6, part7)
      .replaceAll(HOME, '$prefix<HOME>');
}