Class Locate
- java.lang.Object
-
- com.suse.salt.netapi.calls.modules.Locate
-
public class Locate extends Object
salt.modules.locate Module for using the mlocate utilities.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Locate.LocateOpts
All possible options for "locate" method.static class
Locate.Stats
Locate module result object
-
Constructor Summary
Constructors Constructor Description Locate()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LocalCall<List<String>>
locate(String pattern, Optional<String> database, Optional<Integer> limit, Optional<Locate.LocateOpts> options)
Performs a file lookup.static LocalCall<Locate.Stats>
stats()
Returns statistics about the locate database.static LocalCall<List<String>>
updatedb()
Updates the locate database.static LocalCall<List<String>>
version()
Returns the version of 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
-
stats
public static LocalCall<Locate.Stats> stats()
Returns statistics about the locate database.- 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 searchdatabase
- 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
-
-