Skip to content

.NET Library that maps a drive letter to a LOCAL folder on the same machine. Windows-only.

License

Notifications You must be signed in to change notification settings

Urriellu/Subst.NET

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Subst.NET

.NET Library that maps a drive letter to a LOCAL directory on the same machine. Windows-only.

Usage

using System;
using SubstNET;

class Program
{
    static void Main(string[] args)
    {
        Subst.MapDrive('X', @"C:\path\to\dir"); // the contents of this directory will appear as a drive on this Windows computer

        foreach ((char DriveLetter, string PathDirectoryMapped) in Subst.GetAvailableDrives())
        {
            Console.WriteLine(@$"{DriveLetter}:\ is mapped to {PathDirectoryMapped}");
        }

        Subst.UnmapDrive('X');
    }
}

Features

  • Extremely easy to use.
  • Windows-only. It makes no sense to map/create drives on other Operating Systems. You may use hard links on Linux for a similar purpose.
  • Support for mapping a directory as a drive.
  • Support for retrieving the list of virtual drives mapped to directories.
  • Support for unmapping virtual drives.

About

.NET Library that maps a drive letter to a LOCAL folder on the same machine. Windows-only.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages