Skip to content

Commit d37f2ee

Browse files
committed
auto publish
1 parent 0671bd4 commit d37f2ee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+202
-138
lines changed

+stdlib/absolute.m

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
function c = absolute(p, base, expand_tilde, use_java)
2-
%% absolute(p)
3-
% path need not exist
4-
% absolute path will be relative to pwd if not exist
2+
%% ABSOLUTE Determine absolute path
3+
% c = absolute(p);
4+
% Path "p" need not exist.
5+
% Absolute path will be relative to pwd if path does not exist.
6+
%
7+
% c = absolute(p, base);
8+
% the "base" path is used instead of pwd.
59
%
610
%%% Inputs
711
% * p: path to make absolute
812
% * base: if present, base on this instead of cwd
913
% * expand_tilde: expand ~ to username if present
1014
%%% Outputs
11-
% * c: resolved path
12-
% does not normalize
15+
% * c: absolute path
16+
%
17+
% does not normalize path
1318
% non-existant path is made absolute relative to pwd
1419
arguments
1520
p (1,1) string

+stdlib/auto_chunk_size.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function csize = auto_chunk_size(dims)
2-
%% auto_chunk_size(dims)
3-
% automatically determine HDF5 / NetCDF4 chunk size.
2+
%% AUTO_CHUNK_SIZE determine HDF5 / NetCDF4 chunk size
3+
%
44
% based on https://github.com/h5py/h5py/blob/master/h5py/_hl/filters.py
55
% refer to https://support.hdfgroup.org/HDF5/Tutor/layout.html
66
%

+stdlib/canonical.m

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
function c = canonical(p, expand_tilde, use_java)
2-
%% canonical(p)
3-
% If exists, canonical absolute path is returned
4-
% if path does not exist, normalized relative path is returned
2+
%% CANONICAL Canonicalize path
3+
% c = canonical(p);
4+
% If exists, canonical absolute path is returned.
5+
% if path does not exist, normalized relative path is returned.
6+
% UNC paths are not canonicalized.
57
%
6-
% NOTE: some network file systems are not resolvable by Matlab Java
7-
% subsystem, but are sometimes still valid--so return
8-
% unmodified path if this occurs.
9-
%
10-
% This also resolves Windows short paths to full long paths.
8+
% This also resolves Windows short paths to long paths.
119
%
1210
%%% Inputs
1311
% * p: path to make canonical

+stdlib/checkRAM.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function [OK,newSizeBytes,freebytes] = checkRAM(newSize, myclass)
2-
%% checkRAM(newSize, myclass)
2+
%% CHECKRAN estimate if RAM will fit a new array
33
% checks that requested memory for the new array won't exceed AVAILABLE RAM with Matlab
44
%
55
% This script is optimistic as Matlab won't always be able to

+stdlib/cpu_count.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function N = cpu_count
2-
%CPU_COUNT how many CPUs
2+
%% CPU_COUNT how many CPUs are available
33
N = maxNumCompThreads;
44
if N < 2 % happens on some HPC
55
N = feature('NumCores');

+stdlib/cpu_load.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
%% CPU_LOAD get total physical CPU load
33
% https://docs.oracle.com/en/java/javase/21/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getCpuLoad()
44
% Returns the "recent cpu usage" for the whole system.
5+
%
56
% This value is a double in the [0.0,1.0] interval.
67
% A value of 0.0 means that all CPUs were idle during the recent period of time observed, while a value of 1.0 means that all CPUs were actively running 100% of the time during the recent period being observed.
78
% All values betweens 0.0 and 1.0 are possible depending of the activities going on in the system.

+stdlib/create_symlink.m

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
function ok = create_symlink(target, link)
2-
%% create_symlink create symbolic link
3-
% https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/nio/file/Files.html#createSymbolicLink(java.nio.file.Path,java.nio.file.Path,java.nio.file.attribute.FileAttribute...)
2+
%% CREATE_SYMLINK create symbolic link
3+
%
4+
%%% Inputs
5+
% * target: path to link to
6+
% * link: path to create link at
7+
%%% Outputs
8+
% * ok: true if successful
9+
%
10+
% Ref: https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/nio/file/Files.html#createSymbolicLink(java.nio.file.Path,java.nio.file.Path,java.nio.file.attribute.FileAttribute...)
411

512
arguments
613
target (1,1) string

+stdlib/diskfree.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
function freebytes = diskfree(direc)
2-
%% diskfree(direc)
2+
%% DISKFREE disk free space
33
% returns disk free space in bytes
4+
%
45
% example: diskfree('/')
5-
% https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/io/File.html#getUsableSpace()
6+
%
7+
% Ref: https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/io/File.html#getUsableSpace()
68
arguments
79
direc (1,1) string {mustBeFolder}
810
end

+stdlib/exists.m

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
function ok = exists(p, use_java)
2-
%% exists does path exist
3-
% https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/io/File.html#exists()
2+
%% EXIST does path exist
3+
%%% Inputs
4+
% * p: path to check
5+
%%% Outputs
6+
% * ok: true if exists
7+
%
8+
% Ref: https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/io/File.html#exists()
49

510
arguments
611
p (1,1) string

+stdlib/expanduser.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
function e = expanduser(p, use_java)
2-
%% expanduser(path)
3-
% expands tilde ~ into user home directory
2+
%% EXPANDUSER expands tilde ~ into user home directory
43
%
54
% Useful for Matlab functions that can't handle ~
65
%
76
%%% Inputs
87
% * p: path to expand, if tilde present
98
%%% Outputs
10-
% * expanded: expanded path
9+
% * e: expanded path
1110
arguments
1211
p (1,1) string
1312
use_java (1,1) logical = false

0 commit comments

Comments
 (0)