Skip to content

cjung95/FastFileAccess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fast File Access

A library for fast file access on a Windows system using P/Invoke for Win32 API calls. Quickly find files in directories containing hundreds of thousands of files, or check if a file or directory exists on a network share in seconds.

Under Development

This library is currently under development. The Api may change in future releases. If you have any suggestions or feature requests, please open an issue on the GitHub repository.

Features

  • Fast file and directory existence checks
  • Fast file searching in directories with a large number of files

Example Usage

// Check access rights for multiple file access requests
var accessChecker = new AccessChecker();
var fileAccessRequest1 = new FileAccessRequest("C:\\Windows\\System32\\cmd.exe", Models.Enums.FileAccessType.ReadData);
var fileAccessRequest2 = new FileAccessRequest("C:\\Windows\\System32\\cmd.exe", Models.Enums.FileAccessType.WriteData);
var results = accessChecker.CheckAccessRights([fileAccessRequest1, fileAccessRequest2]);
foreach (var result in results.Cast<FileAccessRequest>())
{
    Console.WriteLine($"Path: {result.Path}, AccessType: {result.AccessType}, Status: {result.Status}");
}

// Search for the newest file matching the pattern "c?d.e*" in the "C:\Windows\System32" directory
var fileSearcher = new FileSearcher();
var searchResults = fileSearcher.FindNewestFile("C:\\Windows\\System32", "c?d.e*");
Console.WriteLine($"Newest file: {searchResults}");

About

A library for fast file access on a Windows system using P/Invoke for Win32 API calls.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages