Пример #1
0
        protected override IFtpFolder DoCreateFolder(string aFolderName, VirtualFtpSession aSession)
        {
            lock (this)
            {
                if (HasSubfolder(aFolderName))
                {
                    throw new FtpException(String.Format("Cannot create folder named \"{0}\", a folder with this name already exists.", aFolderName));
                }

                if (!AllowMkDir(aSession))
                {
                    throw new FtpException(550, String.Format("Cannot create folder named \"{0}\", permission denied.", aFolderName));
                }

                IFtpFolder lFolder = new SecureFolder(this, aFolderName, fStorage);
                lFolder.OwningUser = aSession.Username;
                Add(lFolder);
                return(lFolder);
            }
        }
Пример #2
0
 protected override IFtpFolder DoCreateFolder(string aFolderName, VirtualFtpSession aSession)
 {
   lock(this)
   {
     if (HasSubfolder(aFolderName))