fileWithin method

String? fileWithin(
  1. String fileName,
  2. String directoryPath
)

Implementation

String? fileWithin(String fileName, String directoryPath) {
  final directory = fs.directory(directoryPath);

  final file = directory.childFile(fileName);

  if (file.existsSync()) {
    return file.path;
  }

  return null;
}