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
F13226481: D18981.diff
Sun, May 19, 9:04 PM
F13225270: D18981.id45520.diff
Sun, May 19, 2:19 PM
F13220074: D18981.diff
Sat, May 18, 11:08 PM
F13207757: D18981.id45516.diff
Thu, May 16, 3:47 AM
F13195989: D18981.diff
Sun, May 12, 10:49 PM
F13184692: D18981.id.diff
Fri, May 10, 10:14 PM
F13181985: D18981.diff
Thu, May 9, 5:39 PM
F13178594: D18981.diff
Wed, May 8, 8:31 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.