-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathfunctionBackends.m
More file actions
38 lines (33 loc) · 1.24 KB
/
Copy pathfunctionBackends.m
File metadata and controls
38 lines (33 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
%% FUNCTION_BACKENDS
% a compile-time database of which backends are supported for each function.
% struct() is faster than Dictionary in Matlab for this type of use.
function b = functionBackends(funcName)
arguments
funcName {mustBeTextScalar}
end
ds = ["dotnet", "shell"];
dps = ["dotnet", "shell"];
jds = ["java", "dotnet", "shell"];
jps = ["java", "python", "shell"];
jdps = ["java", "dotnet", "python", "shell"];
ndps = ["native", "dotnet", "python", "shell"];
pjsn = ["python", "java", "shell", "native"];
ps = ["python", "shell"];
njpds = ["native", "java", "python", "dotnet", "shell"];
bks = struct(...
'cpu_load', jps, ...
'create_symlink', ndps, ...
'device', jps, 'hard_link_count', jps, 'inode', jps, 'set_modtime', jps, ...
'disk_available', jdps, 'disk_capacity', jdps, ...
'file_checksum', jds, 'filesystem_type', jds, ...
'get_max_open_files', ps, 'is_char_device', ps, 'is_dev_drive', ps, 'is_mount', ps, ...
'is_removable', "shell", ...
'get_owner', jdps, ...
'get_process_priority', dps, 'get_uid', dps, 'uptime', ds, ...
'get_username', jdps, 'hostname', jdps, 'is_admin', jdps, ...
'is_symlink', njpds, 'read_symlink', njpds, ...
'os_version', jdps, ...
'ram_free', jps, 'ram_total', jdps, ...
'samepath', pjsn);
b = bks.(funcName);
end