-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide easy way to loop over files as structure #161
Comments
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In actual state user have an access either to the flat list of files using query, or to full unfiltered layout. It can be helpfull to provide user a way to loop all datafiles returned by query with access to corresponding structure.
It can be done using already existing indexing:
However
return_file_info
rely on find, and so it is time consuming.The easiest solution (that I see), is to create a new function
query_struct(BIDS, query)
which will replicate existingquery(BIDS, 'data', query)
but returnsa list of found file structures. To optimize, thequery("data")
will callquery_struct(BIDS, query)
and retrieve the filenames.Alternatively, an iterator can be implemented:
BEGIN
creates in memory a list of file infos,get
returns corresponding file structurenext
moves current file info to the next in listThe text was updated successfully, but these errors were encountered: