destinationWritable method

bool destinationWritable(
  1. String path
)

Implementation

bool destinationWritable(String path) {
  var current = Directory(path);
  while (!current.existsSync()) {
    final parent = current.parent;
    if (parent.path == current.path) return false;
    current = parent;
  }
  if (Platform.isWindows) return true;
  return FileStat.statSync(current.path).mode & 0x92 != 0;
}