Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
I
iTasks-SDK
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 84
    • Issues 84
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 10
    • Merge Requests 10
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • clean-and-itasks
  • iTasks-SDK
  • Issues
  • #388

Closed
Open
Opened May 07, 2020 by Camil Staps@cstaps🚀Owner

selectFileTree with callback to sort/filter/select/expand

It would be useful to have a version of selectFileTree(Lazy) that uses a callback to determine which elements should be selected, which directories should be expanded, how the elements should be ordered, and which elements should not appear at all. I'm thinking of something along the lines of:

/**
 * Browse for files in a (lazy) tree structure.
 *
 * @param Whether multiple selection is allowed.
 * @param The root directory.
 * @param A callback that will be run with a list of file paths in every
 *   directory encountered. The task returns a list of file paths (possibly
 *   filtered or sorted) with for each file whether it should be selected
 *   (first boolean). The second boolean is only used for directories: when
 *   `True`, it expands the directory by default.
 * @result The selected file paths.
 */
selectFileTreeWith :: // or selectFileTreeLazyWith
	!Bool !FilePath
	!([(FilePath,FileInfo)] -> Task [(FilePath,Bool,Bool)])
	-> Task [FilePath]
Edited May 08, 2020 by Camil Staps
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: clean-and-itasks/iTasks-SDK#388