BExplorer.Shell.ShellView.CreateNewLibrary C# (CSharp) Méthode

CreateNewLibrary() public méthode

Creates a new library folder
public CreateNewLibrary ( String name ) : ShellLibrary
name String The name of the lbrary folder youi want
Résultat ShellLibrary
    public ShellLibrary CreateNewLibrary(String name) {
      String endname = name;
      Int32 suffix = 0;
      ShellLibrary lib = null;
      try {
        lib = ShellLibrary.Load(endname, true);
      } catch {
      }

      if (lib != null) {
        do {
          endname = name + $"({++suffix})";
          try {
            lib = ShellLibrary.Load(endname, true);
          } catch {
            lib = null;
          }
        } while (lib != null);
      }

      return new ShellLibrary(endname, false);
    }
ShellView