Exemple #1
0
        private DirectoryInfo CreateSubdirectoryCore(string path, string templatePath, ObjectSecurity directorySecurity, bool compress)
        {
            string pathLp         = Path.CombineCore(false, LongFullName, path);
            string templatePathLp = templatePath == null ? null :
                                    Path.GetExtendedLengthPathCore(Transaction, templatePath, PathFormat.RelativePath, GetFullPathOptions.TrimEnd | GetFullPathOptions.RemoveTrailingDirectorySeparator);

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

            return(Directory.CreateDirectoryCore(Transaction, pathLp, templatePathLp, directorySecurity, compress, PathFormat.LongFullPath));
        }
 public void Create(DirectorySecurity directorySecurity)
 {
     Directory.CreateDirectoryCore(Transaction, LongFullName, null, directorySecurity, false, PathFormat.LongFullPath);
 }
 public void Create(DirectorySecurity directorySecurity, bool compress)
 {
     Directory.CreateDirectoryCore(Transaction, LongFullName, null, directorySecurity, compress, PathFormat.LongFullPath);
 }
 public void Create()
 {
     Directory.CreateDirectoryCore(Transaction, LongFullName, null, null, false, PathFormat.LongFullPath);
 }