Class GlobGenerator

java.lang.Object
org.applecommander.util.GlobGenerator

public class GlobGenerator extends Object

Utility methods to support glob-style patterns with Apple file names.

Glob patterns supported:

  • * = matches zero or more characters
  • ? = matches exactly one character
  • ** = match any number of directories
  • \x = escape character
  • Constructor Details

    • GlobGenerator

      public GlobGenerator()
  • Method Details

    • globToRegex

      public static String globToRegex(String glob, boolean supportsDirectories)
      Transform glob pattern into a regex expression. This needs to take into effect the "valid" character set used in the filesystem as well as if directories are supported.