public FileServer(MountHandler parent, string host, int port, string user, string pass) { Parent = parent; var fsFact = new VirtualFsFactory(this); var mbFact = new FixedMemberProvider(user, pass); var ass = typeof(FtpServer).Assembly; var commands = new AssemblyFtpCommandHandlerFactory(ass); server = new FtpServer(fsFact, mbFact, host, port, commands); server.Start(); }
void DetermineArgs(MountHandler vfs, VfsEntry model, VirtualEntry entry, out Guid id, out string arg, out string relative) { string serverRef; var mountPoint = vfs.GetMountPath(model, out serverRef); var absolute = entry.Path; var index = absolute.IndexOf(mountPoint, Cmp); relative = absolute.Substring(index + mountPoint.Length); var tmp = serverRef.Split('@'); id = Guid.Parse(tmp.First()); arg = tmp.Last(); }