stdlib API

A standard library of functions for Matlab.

Git branch / commit: main f1d28b3

API Reference

ABSOLUTE Determine absolute path
AUTO_CHUNK_SIZE determine HDF5 / NetCDF4 chunk size
CANONICAL Canonicalize path
CHECKRAM estimate if RAM will fit a new array
CPU_COUNT how many CPUs are available
CPU_LOAD get total physical CPU load
CREATE_SYMLINK create symbolic link
DISKFREE disk free space
EXISTS does path exist
EXPANDUSER expands tilde ~ into user home directory
EXTRACT_ZSTD extract a Zstd archive
FILE_CHECKSUM compute hash of file
FILENAME file name of path
FILESYSTEM_TYPE tell type of filesystem
GET_MODTIME get path modification time
GET_OWNER owner of file or directory
GET_PERMISSIONS permissions of file or directory
GET_SHELL shell of the current user
GET_USERNAME tell username of current user
GETPID process ID of Matlab
H4EXISTS check if object exists in HDF4 file
H4SIZE get size (shape) of a HDF4 variable
H4VARIABLES get HDF4 dataset names
H5CREATE_GROUP create HDF5 group
H5EXISTS check if object exists
H5SAVE save data to HDF5 file
H5SIZE get shape of HDF5 variable
H5VARIABLES get HDF5 dataset names
HANDLE2FILENAME Convert a file handle to a filename
HARD_LINK_COUNT get the number of hard links to a file
HAS_JAVA detect if JVM is available
HAS_WSL is Windows Subsystem for Linux installed
HOMEDIR get user home directory
HOSTNAME get hostname of local machine
INI2STRUCT Parses .ini file
IS_ABSOLUTE is path absolute?
IS_EXE is file executable
IS_PARALLEL_WORKER being executed by Parallel Computing Toolbox?
IS_READABLE is file readable
IS_REGULAR_FILE check if path is a regular file
IS_ROSETTA is running on Apple Silicon using Rosetta
IS_SUBDIR is subdir a subdirectory of dir?
IS_SYMLINK is it a symbolic link
IS_WINDOWS_POWERSHELL detects Windows powershell vs. Command Prompt
IS_WRITABLE is path writable
IS_WSL_PATH detect a WSL path
ISCYGWIN Detect if running under Cygwin
ISINTERACTIVE tell if being run interactively
ISOCTAVE Detects if this is GNU Octave
ISWSL detect if running under WSL
JAVA_API Java API version
JAVA_VERSION get version of Java Virtual Machine
JOIN join two paths with posix file separator
MAKEDIR make dtory and check for success
MD5SUM compute MD5 hash of file
NCEXISTS check if variable exists in NetCDF4 file
NCSAVE save data to NetCDF4 file
NCSIZE get size (shape) of a NetCDF4 variable
NCVARIABLES get NetCDF dataset names
NORMALIZE remove redundant elements of path
NULL_FILE get null file path
PARENT parent directory of path
POSIX posix format of path with '/' separator
PROXIMATE_TO proximate path to base
RAM_FREE get free physical RAM
RAM_TOTAL get total physical RAM
READ_SYMLINK read symbolic link
RELATIVE_TO relative path to base
RESOLVE resolve path
ROOT get root of path
SAMEPATH is path the same
SET_MODTIME set modification time of path
SHA256SUM compute sha256 hash of file
STEM filename without directory or suffix
SUBPROCESS_RUN run process with optional cwd, env. vars, stdin stream
SUFFIX last suffix of filename
TOUCH create file if not exists, else update modification time
VERSION_ATLEAST compare two string verions: major.minor.rev.patch
WHICH find executable in fpath or env var PATH
WINDOWS_SHORTNAME Retrieves the Windows short name (8.3 character) form
WINPATH2WSLPATH convert Windows path to WSL path
WITH_SUFFIX switch file extension
WSL_TEMPFILE get temporary file from WSL
WSLPATH2WINPATH convert a WSL path to a Windows path