Skip to content

Commit 263cabc

Browse files
committed
is_exe: use java canExecute
1 parent 9ca1c2e commit 263cabc

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

+stdlib/+fileio/is_exe.m

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@
99
return
1010
end
1111

12-
if ~isfile(file)
13-
ok = false;
14-
return
15-
end
16-
17-
[ok1, stat] = fileattrib(file);
18-
ok = ok1 == 1 && (stat.UserExecute == 1 || stat.GroupExecute == 1);
12+
ok = java.io.File(file).canExecute();
1913

2014
end

0 commit comments

Comments
 (0)