isExecutableFilePath static method

bool isExecutableFilePath(
  1. String filePath, [
  2. List<String>? executableExtensions
])

Implementation

static bool isExecutableFilePath(String filePath,
    [List<String>? executableExtensions]) {
  executableExtensions ??= defaultExecutableExtensions;

  return executableExtensions
      .where((ext) => filePath.endsWith('.$ext'))
      .isNotEmpty;
}