isHidden function

bool isHidden(
  1. String path,
  2. String root
)

Implementation

bool isHidden(String path, String root) {
  // trying to infer relative path
  if (pathlib.relative(path, from: root).startsWith('.')) {
    return true;
  } else {
    return false;
  }
}