Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4017814
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:54:26+00:00 2026-05-20T09:54:26+00:00

Is the pattern matching logic used by this API exposed for reuse somewhere in

  • 0

Is the pattern matching logic used by this API exposed for reuse somewhere in the .Net Framework?

Something of the form FilePatternMatch( string searchPattern, stringfileNameToTest ) is what I’m looking for.

I’m implementing a temporary workaround for WP7 not filtering the results for this overload and I’d like the solution to both provide a consistent experience and avoid reinventing this functionality if it is exposed.

If the behaviour is not exposed for reuse, a regular expression solution (like glob pattern matching in .NET) will suffice and would save me spending the time to test the fine details of what the behaviour should be.

Perhaps one of the answers posted in the thread linked above is correct. Since I haven’t confirmed the exact behaviour as yet, I wasn’t able to determine this at a glance. Feel free to point me to one of those answers if you know it is behaviouraly an exact match to the API referenced in the question title.

I could assume the pattern matching is consistent with how DOS handled * and ? in 8.3 file names (I’m familiar with behavioural nuances of that implementation), but it’s reasonable to assume Microsoft has evolved pattern matching behaviour for file names in the decade+ since so I thought I would check before proceeding on that assumption.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T09:54:26+00:00Added an answer on May 20, 2026 at 9:54 am

    The pattern matching rules used by IsolatedStorageFile.GetFileNames() is the same as that used in System.IO.Path. They both use the Win32 API FindFirstFile/FindNextFile Functions, namely:

    The directory or path, and the file
    name, which can include wildcard
    characters, for example, an asterisk
    (*) or a question mark (?).

    This parameter should not be NULL, an
    invalid string (for example, an empty
    string or a string that is missing the
    terminating null character), or end in
    a trailing backslash ().

    If the string ends with a wildcard,
    period (.), or directory name, the
    user must have access permissions to
    the root and all subdirectories on the
    path.

    In the ANSI version of this function,
    the name is limited to MAX_PATH
    characters. To extend this limit to
    32,767 widecharacters, call the
    Unicode version of the function and
    prepend “\?\” to the path. For more
    information, see Naming a File

    .

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Actually, this question seems to have two parts: How to implement pattern matching? How
I read somewhere that Pattern Matching like that supported by the match/case feature in
I want to do some pattern matching on lists in Python. For example, in
There is a simple C++ method to use pattern matching on strings? The code
I'm just curious about the efficiency of pattern matching in Haskell. What is a
I have been trying to explain the difference between switch statements and pattern matching(F#)
Pattern pattern = Pattern.compile(^[a-z]+$); String string = abc-def; assertTrue( pattern.matcher(string).matches() ); // obviously fails
The .NET IDisposable Pattern implies that if you write a finalizer, and implement IDisposable,
I'm new to pattern matching, having finally figured it out. I am stuck trying
Sometimes I get annoying pattern matching and indent warnings when compiling F#. Is there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.