SDT-base         Contents     Functions         Previous Next     PDF Index

sdtu.f

Purpose

File utilities.

find

Find files matching a name

%% examples
sdtu.f.find('@sdt/help/sdt.pdf')
li=sdtu.f.find('@sdt/fe*.m')

cffile

sdtu.f.cffile canonical full file path resolution

Syntax: sdth.fileutil('cffile',fname) This command gets back the canonical path (mainly resolves symlinks with a unique hard link, relative path features /../, ...).

abs2rel

sdtu.f.abs2rel relative path resolution

Syntax: [fname,wd]=sdth.fileutil('abs2rel',FileName,root) This command gets back relative path fname and root if root is an effective root of FileName, else gets back FileName and an empty wd.

rel2abs

sdtu.f.rel2abs absolute path resolution

Syntax: FileName=sdth.fileutil('rel2abs',fname,root) This command gets back fname if it is already an absolute path, else gets back the concatenation of root and fname.

firstdir

wd=sdth.fileutil('firstdir',wd1,wd2) gets back the first found directory in the provided list, the following command options are available: - cd: move the current directory to the found folder. - base: assign in base the found folder in variable wd.

fileutil

sdtu.f.fileutil file handling utilities handles folder search, canonical path resolution, switches between full and relative path, file locking...


©1991-2025 by SDTools
Previous Up Next