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
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
Unknown Object (File)
Apr 10 2025, 7:07 AM
Unknown Object (File)
Apr 1 2025, 10:19 AM
Unknown Object (File)
Mar 30 2025, 1:34 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
Branch
finder3
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 19305
Build 26092: Run Core Tests
Build 26091: arc lint + arc unit

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.