isFileAccessible method

bool isFileAccessible(
  1. String filePath
)

Check if file exists and is readable

Implementation

bool isFileAccessible(String filePath) {
  final file = File(filePath);
  return file.existsSync() && file.statSync().mode & 0x004 != 0;
}