Class Locate


  • public class Locate
    extends Object
    salt.modules.locate Module for using the mlocate utilities.
    • Constructor Detail

      • Locate

        public Locate()
    • Method Detail

      • version

        public static LocalCall<List<String>> version()
        Returns the version of locate.
        The result is a list of Strings representing each a line of the output of the 'locate --v' execution.
        Returns:
        The LocalCall object to make the call
      • updatedb

        public static LocalCall<List<String>> updatedb()
        Updates the locate database.
        A successful result will return an empty list of Strings.
        If any error is returned, then a list of Strings representing each a line of the error output is returned.
        Returns:
        The LocalCall object to make the call
      • locate

        public static LocalCall<List<String>> locate​(String pattern,
                                                     Optional<String> database,
                                                     Optional<Integer> limit,
                                                     Optional<Locate.LocateOpts> options)
        Performs a file lookup. Valid options (and their defaults) are:
        • basename=False
        • count=False
        • existing=False
        • follow=True
        • ignore=False
        • nofollow=False
        • wholename=True
        • regex=False
        Parameters:
        pattern - The pattern to search
        database - Replace the default database.
        limit - Set the maximum number of results.
        options - More options to mofify the search.
        Returns:
        The LocalCall object to make the call