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
F14083924: D18981.diff
Sat, Nov 23, 6:08 AM
Unknown Object (File)
Thu, Nov 21, 6:22 PM
Unknown Object (File)
Wed, Nov 20, 10:01 PM
Unknown Object (File)
Tue, Nov 19, 9:23 AM
Unknown Object (File)
Thu, Nov 14, 7:37 PM
Unknown Object (File)
Sun, Nov 10, 7:40 PM
Unknown Object (File)
Thu, Nov 7, 10:50 AM
Unknown Object (File)
Mon, Oct 28, 7:43 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.