Page MenuHomePhabricator

Escape glob characters for FileFinder's withSuffix() and withName()
ClosedPublic

Authored by epriestley on Jan 31 2018, 9:32 PM.
Tags
None
Referenced Files
F18245962: D18981.id.diff
Thu, Aug 21, 11:23 AM
F18230156: D18981.diff
Wed, Aug 20, 12:06 PM
F18088221: D18981.id45516.diff
Wed, Aug 6, 7:20 AM
Unknown Object (File)
May 7 2025, 2:27 PM
Unknown Object (File)
May 7 2025, 6:51 AM
Unknown Object (File)
Apr 30 2025, 1:10 PM
Unknown Object (File)
Apr 29 2025, 1:15 PM
Unknown Object (File)
Apr 13 2025, 6:54 PM
Subscribers
None

Details

Summary

Depends on D18980. When you search for files withSuffix('t*t'), that should match that suffix, literally, in a portable way.

Test Plan

Added unit tests and made them pass.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

  • Create a temporary directory and write all the glob garbage to it instead.
amckinley added inline comments.
src/filesystem/__tests__/FileFinderTestCase.php
128–130

thumbsup.gif (320×300 px, 6 MB)

This revision is now accepted and ready to land.Jan 31 2018, 10:02 PM
This revision was automatically updated to reflect the committed changes.