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)
Sun, Feb 9, 5:11 AM
Unknown Object (File)
Sun, Feb 9, 5:10 AM
Unknown Object (File)
Sun, Feb 9, 5:10 AM
Unknown Object (File)
Sun, Feb 9, 5:10 AM
Unknown Object (File)
Fri, Jan 31, 4:56 AM
Unknown Object (File)
Fri, Jan 24, 11:33 PM
Unknown Object (File)
Fri, Jan 24, 11:32 PM
Unknown Object (File)
Fri, Jan 24, 11:32 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.