Beispiel #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));
        }
Beispiel #2
0
 public void Create(DirectorySecurity directorySecurity, bool compress)
 {
     Directory.CreateDirectoryInternal(Transaction, LongFullName, null, directorySecurity, compress, PathFormat.LongFullPath);
 }
Beispiel #3
0
 public void Create(DirectorySecurity directorySecurity)
 {
     Directory.CreateDirectoryInternal(Transaction, LongFullName, null, directorySecurity, false, PathFormat.LongFullPath);
 }
Beispiel #4
0
 public void Create()
 {
     Directory.CreateDirectoryInternal(Transaction, LongFullName, null, null, false, PathFormat.LongFullPath);
 }