xx=dircrd([])
xx : | result if dir |
dir db*.m
dircrd db*.m
ans.date
This function, dircrd
, is designed to list directory contents similar to the dir
function, but it returns the creation date of files instead of the modification date.
varargin
: A variable-length input argument list that allows the function to accept any number of input arguments, similar to the dir
function. These arguments specify the directory path and file pattern to search for.xx
: A structure array similar to the output of dir
, but with the date
field replaced by the file creation date.dir
function with the input arguments to get a list of files and directories matching the specified pattern. Store the result in xx
.xx
using numel
and store it in nn
.xx
using a for-loop from 1 to nn
:showprogress
to display the progress of the operation.filesep
for the directory separator.fcreationdate
with the full file path and a boolean true
to retrieve the creation date of the file.date
field of the current element in xx
with the creation date obtained from fcreationdate
.The function is noted to be too slow for practical use as of June 2024, and it was first introduced in SolidGeometry version 5.4.
Algorithm explaination created using ChatGPT on 2025-08-18 22:29. (Please note: No guarantee for the correctness of this explanation)