I want to create a mounted Folder to be encrypted later, my point is that create a normal directory(C:\path\to\myfolder) and mount it to a drive (I:\) so any change will occurs in both path, my goal is if any file added to I:\ will be automatically encrypted in C:\path\to\myfolder
Questions:
- How to monitor the mounted folder and encrypt its children (files or directories) without touching files or directories under the drive.
- is there any way to create this mounted folder from the beginning so any file added will be automatically encrypted under the folder and decrypted under the drive, and if it is already exist when I mount it, files will be decrypted under the associated drive.
any help will be appreciated.
If you want to use NTFS encryption then you can make use of
EncryptFileAPI that will make existing file/directory encrypted. If directory is provided any new files added to it will be encrypted.More information at Handling Encrypted Files and Directories
Or do you want to implement your own encryption driver?