Skip to content

Update FileFinder to return std::filesystem::path when handling full file path#40874

Merged
KedoKudo merged 9 commits intomantidproject:mainfrom
rosswhitfield:update_FileFinder_to_filesystem_path
Feb 17, 2026
Merged

Update FileFinder to return std::filesystem::path when handling full file path#40874
KedoKudo merged 9 commits intomantidproject:mainfrom
rosswhitfield:update_FileFinder_to_filesystem_path

Conversation

@rosswhitfield
Copy link
Member

@rosswhitfield rosswhitfield commented Feb 11, 2026

Description of work

This changes the return type of file paths to use std::filesystem::path instead of string. I also tried to make the parameter names more consistent between different methods for things like the hint.

Note: On unix systems std::filesystem::path will implicitly cast to std::string. But on windows that doesn't happen so a lot of .string() was needed to be added, mainly for tests.

Part of work towards #40542

To test:

Code review is all.

This does not require release notes because internal change only not visible to users.


Reviewer

Your comments will be used as part of the gatekeeper process. Comment clearly on what you have checked and tested during your review. Provide an audit trail for any changes requested.

As per the review guidelines:

  • Is the code of an acceptable quality? (Code standards/GUI standards)
  • Has a thorough functional test been performed? Do the changes handle unexpected input/situations?
  • Are appropriately scoped unit and/or system tests provided?
  • Do the release notes conform to the guidelines and describe the changes appropriately?
  • Has the relevant (user and developer) documentation been added/updated?
  • If the PR author isn’t in the mantid-developers or mantid-contributors teams, add a review comment rerun ci to authorize/rerun the CI

Gatekeeper

As per the gatekeeping guidelines:

  • Has a thorough first line review been conducted, including functional testing?
  • At a high-level, is the code quality sufficient?
  • Are the base, milestone and labels correct?

@rosswhitfield rosswhitfield added this to the Release 6.16 milestone Feb 11, 2026
@rosswhitfield rosswhitfield added Framework Issues and pull requests related to components in the Framework Technical Debt Marks a piece of work to address technical debt introduced to solve a problem quickly labels Feb 11, 2026
@rosswhitfield rosswhitfield force-pushed the update_FileFinder_to_filesystem_path branch 4 times, most recently from 994c1fc to 3eb8470 Compare February 11, 2026 04:01
@rosswhitfield rosswhitfield marked this pull request as draft February 11, 2026 04:01
@rosswhitfield rosswhitfield force-pushed the update_FileFinder_to_filesystem_path branch 2 times, most recently from b5b5d90 to 9a8571f Compare February 12, 2026 03:27
@rosswhitfield rosswhitfield marked this pull request as ready for review February 12, 2026 04:32
@rosswhitfield rosswhitfield changed the title Update FileFinder to return filesystem::path when handling full filename Update FileFinder to return std::filesystem::path when handling full file path Feb 12, 2026
Copy link
Member

@peterfpeterson peterfpeterson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much more sensible code. Sorry that changing the return required changing a bunch of other places.

@KedoKudo KedoKudo merged commit 3800de7 into mantidproject:main Feb 17, 2026
10 checks passed
rosswhitfield added a commit that referenced this pull request Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Framework Issues and pull requests related to components in the Framework Technical Debt Marks a piece of work to address technical debt introduced to solve a problem quickly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants