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)
Thu, Jan 16, 1:05 AM
Unknown Object (File)
Wed, Jan 15, 3:57 PM
Unknown Object (File)
Tue, Dec 24, 6:23 PM
Unknown Object (File)
Mon, Dec 23, 11:08 AM
Unknown Object (File)
Dec 18 2024, 10:53 AM
Unknown Object (File)
Dec 12 2024, 10:52 PM
Unknown Object (File)
Dec 8 2024, 9:28 PM
Unknown Object (File)
Dec 7 2024, 8:04 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.