Chromium Code Reviews

Side by Side Diff: packages/which/lib/src/is_executable.dart

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « packages/which/lib/src/has_permission.dart ('k') | packages/which/lib/src/util.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 library which.src.is_executable; 2 library which.src.is_executable;
3 3
4 import 'dart:async'; 4 import 'dart:async';
5 import 'dart:io'; 5 import 'dart:io';
6 6
7 import 'package:when/when.dart'; 7 import 'package:when/when.dart';
8 8
9 import 'has_permission.dart'; 9 import 'has_permission.dart';
10 10
(...skipping 13 matching lines...)
24 // There is no concept of executable on windows. 24 // There is no concept of executable on windows.
25 if (isWindows) return true; 25 if (isWindows) return true;
26 26
27 // TODO: This currently produces false positives (returns true when it 27 // TODO: This currently produces false positives (returns true when it
28 // shouldn't) when the uid/gid of current user and executable don't 28 // shouldn't) when the uid/gid of current user and executable don't
29 // match. Fix if/when uid/gid support is added: 29 // match. Fix if/when uid/gid support is added:
30 // http://dartbug.com/22037. 30 // http://dartbug.com/22037.
31 return FilePermissionRole.values.any((role) => 31 return FilePermissionRole.values.any((role) =>
32 hasPermission(stat.mode, FilePermission.EXECUTE, role: role)); 32 hasPermission(stat.mode, FilePermission.EXECUTE, role: role));
33 } 33 }
OLDNEW
« no previous file with comments | « packages/which/lib/src/has_permission.dart ('k') | packages/which/lib/src/util.dart » ('j') | no next file with comments »

Powered by Google App Engine