Esempio n. 1
0
        private DirectoryInfo CreateSubdirectoryInternal(string path, string templatePath, DirectorySecurity directorySecurity, bool compress)
        {
            string pathLp         = Path.CombineInternal(false, LongFullName, path);
            string templatePathLp = templatePath == null ? null :
                                    Path.GetExtendedLengthPathInternal(Transaction, templatePath, PathFormat.RelativePath, GetFullPathOptions.TrimEnd | GetFullPathOptions.RemoveTrailingDirectorySeparator);

            if (string.Compare(LongFullName, 0, pathLp, 0, LongFullName.Length, StringComparison.OrdinalIgnoreCase) != 0)
            {
                throw new ArgumentException("Invalid SubPath", pathLp);
            }

            return(Directory.CreateDirectoryInternal(Transaction, pathLp, templatePathLp, directorySecurity, compress, PathFormat.LongFullPath));
        }