File tree Expand file tree Collapse file tree 3 files changed +3
-13
lines changed Expand file tree Collapse file tree 3 files changed +3
-13
lines changed Original file line number Diff line number Diff line change 13
13
% the above should work, but Matlab Java doesn't recognize the optional argument omitted.
14
14
15
15
if stdlib .fileio .exists(link )
16
- warning(" link %s already exists" , link )
17
16
ok = false ;
18
17
return
19
18
end
Original file line number Diff line number Diff line change 8
8
import java .nio .file .Files
9
9
10
10
r = stdlib .fileio .absolute_path(p );
11
- if ~stdlib .fileio .exists(r )
12
- warning(" %s does not exist" , r )
13
- r = string .empty ;
14
- return
15
- end
16
- if ~stdlib .fileio .is_symlink(r )
17
- warning(" %s is not a symlink" , r )
11
+ if ~stdlib .fileio .exists(r ) || ~stdlib .fileio .is_symlink(r )
18
12
r = string .empty ;
19
13
return
20
14
end
Original file line number Diff line number Diff line change 16
16
short = " " ;
17
17
18
18
if ~ispc
19
- warning(' Only available on Windows' )
20
19
return
21
20
end
22
21
23
22
fso = actxserver(' Scripting.FileSystemObject' );
24
23
25
24
if isfolder(p )
26
- short = fso .GetFolder(p ).ShortPath;
25
+ short = fso .GetFolder(p ).ShortPath;
27
26
elseif isfile(p )
28
- short = fso .GetFile(p ).ShortPath;
29
- else
30
- warning(' %s is not folder or file' , p );
27
+ short = fso .GetFile(p ).ShortPath;
31
28
end
32
29
33
30
short = string(short );
You can’t perform that action at this time.
0 commit comments