Microsoft.VisualStudio.ProjectSystem.FileSystemMirroring.IO.MsBuildFileSystemWatcherEntries.DeleteDirectory C# (CSharp) Méthode

DeleteDirectory() public méthode

public DeleteDirectory ( string relativePath ) : void
relativePath string
Résultat void
        public void DeleteDirectory(string relativePath) {
            try {
                relativePath = PathHelper.EnsureTrailingSlash(relativePath);
                foreach (var entry in GetDirectoryEntries(relativePath).ToList()) {
                    DeleteEntry(entry);
                }
            } catch (InvalidStateException) {
                RescanRequired = true;
            }
        }

Usage Example

 private void DeleteInsteadOfRename()
 {
     if (!_oldFullPath.StartsWithIgnoreCase(_rootDirectory))
     {
         return;
     }
     _entries.DeleteDirectory(PathHelper.MakeRelative(_rootDirectory, _fullPath));
 }
All Usage Examples Of Microsoft.VisualStudio.ProjectSystem.FileSystemMirroring.IO.MsBuildFileSystemWatcherEntries::DeleteDirectory