Hi Matthias,
welcome to the Rebex forum. You can use for this scenario our new API.
1) Create LocalFileSystemProvider
private LocalFileSystemProvider createFileSystem()
{
var localFileSystem = new LocalFileSystemProvider(@"<<your path>>");
//subscribe to CreatePreview event
localFileSystem.GetFileSystemNotifier().CreatePreview += (sender, args) =>
{
if (args.Node.IsDirectory)
{
args.CancelOperation();
}
};
return localFileSystem;
}
2) Use FileSystemProvider.
_fileSystem = createFileSystem();
_user01 = new FileServerUser(_username, _password, _userVirtualRoot);
_server.Users.Add(_user01);
_user01.SetFileSystem(_fileSystem);
Please note that LocalFileSystemProvider is a part of the new file system API (https://www.rebex.net/file-server/features/virtual-file-systems.aspx), which is available since Version 2017 R4 (https://www.rebex.net/total-pack/history.aspx#2017R4)