Hi asgallant,
thanks for the question.
Despite the tight integration between both components and intended similarities in the API, FileServer and Virtual FileSystem are two independent components.
I think that you are looking for this.
1) Add the reference to the Rebex.FileServer assembly.
2) Add the using directive - using Rebex.Net.Servers.
3) Use the ServerSession.Current static property.
https://www.rebex.net/doc/api/Rebex.Net.Servers.ServerSession.Current.html
private static void MyFilterDownloadFiles(object sender, GetChildrenEventArgs e)
{
// obtain the current session.
var session = ServerSession.Current;
...
}
You can obtain a current session from every event handler in the FileSystemNotifier and from methods in the Read(Write)FileSystemProvider as well. From the Virtual File System component point of view ServerSession.Current is an "ambient context" (when the Virtual File System serves as a constitutive part of the FileServer).