What is the corresponding function for Directory.GetDirectories in c# zeta long path?

JunYoungLee 161 Reputation points
2022-07-01T10:40:03.2+00:00

I'm using the zeta long paths library with c#. And I want to know the zeta long paths function corresponding to the code below.

var directories = Directory.GetDirectories("my_path");  
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,676 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,278 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,125 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Hui Liu-MSFT 40,271 Reputation points Microsoft Vendor
    2022-07-04T07:50:31.587+00:00

    Hi,@JunYoungLee . Welcome Microsoft Q&A.

    You could try to see if the content here is what you want.
    var folderPath = new ZlpDirectoryInfo( @"C:\My\Long\Folder\Path" );

    foreach ( var filePath in folderPath.GetFiles() )  
    {  
        Console.Write( "File {0} has a size of {1}",  
            filePath.FullName,  
            filePath.Length );  
    }  
    

    If the response is helpful, please click "Accept Answer" and upvote it.
     Note: Please follow the steps in our [documentation][5] to enable e-mail notifications if you want to receive the related email notification for this thread. 

    [5]: https://learn.microsoft.com/en-us/answers/articles/67444/email-notifications.html