by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CODING/DEVELOP
Introduced first in SolidGeometry 5.3, Creation date: 2023-03-29, Last change: 2025-08-18
b=mdfind([])
b: | result of spotlight as cell list |
mdfind aston martin coloured .stl
This MATLAB function, mdfind, is designed to perform a file search on macOS using the Spotlight search feature via the terminal command mdfind. The function is part of the SolidGeometry library and was introduced in version 5.3.
varargin: A variable-length input argument list. Each element in varargin is a string that represents a search term or parameter for the mdfind command.b: A cell array containing the results of the Spotlight search. Each element is a file path that matches the search criteria.txt with the value 'mdfind'.varargin and append it to txt with a space separator. This constructs the full command to be executed in the terminal.system function, which runs the command in the macOS terminal. The output is captured in b.b into separate lines using splitlines.b to include only those that contain a forward slash '/', which indicates a file path.nargout == 0), convert the file paths in b to hyperlinks using the strhyperlinkmatlab function with the 'open' option.