Class RootAndGlob
java.lang.Object
com.azure.tools.codesnippetplugin.RootAndGlob
Contains a search root and file glob that is used to determine which files to include in processing.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetGlob()Gets the glob that determines which files to include.getRoot()Gets the root directory to begin searching.Gets the list of files that are included based on the root and glob.booleanGets whether the root directory exists.Sets the glob that determines which files to include.Sets the root directory to begin searching.
-
Constructor Details
-
RootAndGlob
public RootAndGlob()Creates a newRootAndGlob.
-
-
Method Details
-
getRoot
Gets the root directory to begin searching.- Returns:
- The root directory where searching begins.
-
setRoot
Sets the root directory to begin searching.- Parameters:
root- The root directory where searching begins.- Returns:
- The updated RootAndGlob object.
- Throws:
NullPointerException- Ifrootis null.
-
rootExists
public boolean rootExists()Gets whether the root directory exists.- Returns:
- Whether the root directory exists.
-
getGlob
Gets the glob that determines which files to include.- Returns:
- The glob that determines which files to include.
-
setGlob
Sets the glob that determines which files to include.- Parameters:
glob- The glob that determines which files to include.- Returns:
- The updated RootAndGlob object.
- Throws:
NullPointerException- Ifglobis null.
-
globFiles
Gets the list of files that are included based on the root and glob.- Returns:
- The list of files contained in the root directory that match the glob.
- Throws:
IOException- If an I/O failure occurs while walking the root directory.
-