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
F18650528: D18981.diff
Sun, Sep 21, 12:57 AM
F18649699: D18981.id45516.diff
Sat, Sep 20, 10:01 PM
F18468467: D18981.id45520.diff
Sep 2 2025, 3:20 PM
F18386454: D18981.diff
Aug 29 2025, 2:16 AM
F18245962: D18981.id.diff
Aug 21 2025, 11:23 AM
F18230156: D18981.diff
Aug 20 2025, 12:06 PM
F18088221: D18981.id45516.diff
Aug 6 2025, 7:20 AM
Unknown Object (File)
May 7 2025, 2:27 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.