UweKeim / ZetaLongPaths

A .NET library to access files and directories with more than 260 characters length.

Home Page:https://nuget.org/packages/ZetaLongPaths

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pattern format

CanadianHusky opened this issue · comments

Hello,

I think this is an easy Question : What is the expected pattern format ? The .NET Standard GetFiles() function takes a string array.
The ZLP Libary is expecting a regular string.

How do I specify multiple file extension , for example "*.pdf, *.jpg, *.docx"?

Public Function GetFiles(pattern As String, searchOption As SearchOption) As ZlpFileInfo()

Great Library! Well Done!

Could you tell me the documentation reference to the Directory.GetFiles() with a string array input parameter?

I've tried to search the documentation, but found no overload of Directory.GetFiles() that has the signature you mentioned.

To answer your actual question:

You have to run the GetFiles() multiple times, one call for each wildcard pattern. (This is the same behaviour as the original [Directory.GetFiles()](https://docs.microsoft.com/en-us/dotnet/api/system.io.directory.getfiles?view=net-5.0)).

I did a workaround, run search with *.* and filter out un/wanted patterns using a hashtable lookup, cause it is faster than running a search on a very deep directory more than once.

thank you for the prompt response...Dankeschön