We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 685fe9b commit 91b145bCopy full SHA for 91b145b
+stdlib/+fileio/which.m
@@ -1,11 +1,10 @@
1
-function exe = which(name, fpath, subdir)
+function exe = which(name, fpath)
2
% fileio.which Find executable with name under path
3
% like Python shutil.which, may return relative or absolute path
4
5
arguments
6
name (1,1) string {mustBeNonzeroLengthText}
7
fpath (1,:) string = getenv('PATH')
8
- subdir (1,:) string {mustBeNonempty} = ""
9
end
10
11
import stdlib.fileio.is_exe
@@ -37,11 +36,9 @@
37
36
38
39
for p = fpath
40
- for s = subdir
41
- exe = fullfile(p, s, name);
42
- if is_exe(exe)
43
- return
44
- end
+ exe = fullfile(p, name);
+ if is_exe(exe)
+ return
45
46
47
0 commit comments