The instance of the HunspellManager, looks for the native lib in
the directory specified.

@param libDir Optional absolute directory where the native lib can be found.
430145
public static synchronized Hunspell getInstance(String libDir) throws UnsatisfiedLinkError, UnsupportedOperationException {
        if (hunspell != null) {
            return hunspell;
        }

        hunspell = new Hunspell(libDir);
        return hunspell;
    }
314127
def puppet_repl_lib_dir
      File.expand_path(File.join(File.dirname(File.dirname(File.dirname(__FILE__))), 'lib'))
    end
164324
public String[] getDirectoryContent(String scannerBaseDir, String[] includes, String[] excludes, boolean followSymlinks, boolean globCaseSensitive) {
        return getDirectoryContent(scannerBaseDir, includes, excludes, followSymlinks, globCaseSensitive, false);
    }
1347914
private static boolean isSavedInDir(ScriptWrapper scriptWrapper, File directory) {
		File file = scriptWrapper.getFile();
		if (file == null) {
			return false;
		}
		return file.getParentFile().equals(directory);
	}
716717
public boolean initSenSegmenter(String modelDir){
		System.out.println("Initilize JVnSenSegmenter ...");
		
		//initialize sentence segmentation
		vnSenSegmenter = new JVnSenSegmenter();		
		if (!vnSenSegmenter.init(modelDir)){
			System.out.println("Error while initilizing JVnSenSegmenter");
			vnSenSegmenter = null;
			return false;
		}
			
		return true;
	}
457180
def get_decoder(libdir=None, modeldir=None, lang='en-us'):
    
    modeldir = modeldir or (os.path.join(libdir, 'model') if libdir else MODELDIR)
    libdir = os.path.dirname(modeldir)
    config = ps.Decoder.default_config()
    config.set_string('-hmm', os.path.join(modeldir, lang))
    config.set_string('-lm', os.path.join(modeldir, lang + '.lm.bin'))
    config.set_string('-dict', os.path.join(modeldir, 'cmudict-' + lang + '.dict'))
    print(config)
    return ps.Decoder(config)
913377
function writeLicensesFile(rootDir) {

    var licenses = checkLicenses(rootDir),
        licensesFileContent = "LICENSES " + "\n \n";

    _(licenses).each(function(licenseData, licenseName) {

        licensesFileContent += licenseName + " : ";

        if(licenseData.isMIT) {
            licensesFileContent += "MIT";
        }
        else {
            licensesFileContent += "Unknown License";
        }

        licensesFileContent += "\n \n";

        if(licenseData.content) {
            licensesFileContent += licenseData.content + "\n \n";
        }

    });

    fs.writeFileSync(rootDir + "/LICENSES", licensesFileContent, "utf-8");
}
116985
public Optional<Path> findLibraryInstall(String libraryName) {
        return getArduinoDirectory().map(path -> {
            Path libsDir = path.resolve("libraries");
            Path tcMenuDir = libsDir.resolve(libraryName);
            if (Files.exists(tcMenuDir)) {
                return tcMenuDir;
            }
            return null;
        });
    }
1221189
public static void directoryCheck(String dir) throws IOException {
		final File file = new File(dir);

		if (!file.exists()) {
			FileUtils.forceMkdir(file);
		}
	}
542359
public void setCompileDirectory(String directory) {
        if (directory != null && directory.trim().length() > 0) {
            File file = new File(directory);
            if (file.exists() || file.mkdirs()) {
                this.compileDirectory = file;
            }
        }
    }
615714
public static void setInstallDir(File installDir) {
        Utils.installDir = StaticValue.mutateStaticValue(Utils.installDir, new FileInitializer(installDir));
    }
751732
private DirectoryService createDirectoryService() {

        final DirectoryServiceFactory factory = new DefaultDirectoryServiceFactory();
        try {
            factory.init("scribble");
            return factory.getDirectoryService();
        } catch (Exception e) { //NOSONAR

            throw new AssertionError("Unable to create directory service", e);
        }
    }
842272
public boolean finalizeNativeLibs(final ClassLoader cl) throws ValidatorManagerException {
    boolean res = false;
    final Class classClassLoader = ClassLoader.class;
    java.lang.reflect.Field nativeLibraries = null;
    try {
      nativeLibraries = classClassLoader.getDeclaredField("nativeLibraries");
    } catch (final NoSuchFieldException e) {
      throw new ValidatorManagerException(e);
    }
    if (nativeLibraries == null) {
      return res;
    }
    nativeLibraries.setAccessible(true);
    Object obj = null;
    try {
      obj = nativeLibraries.get(cl);
    } catch (final IllegalAccessException e) {
      throw new ValidatorManagerException(e);
    }
    if (!(obj instanceof Vector)) {
      return res;
    }
    res = true;
    final Vector java_lang_ClassLoader_NativeLibrary = (Vector) obj;
    for (final Object lib : java_lang_ClassLoader_NativeLibrary) {
      java.lang.reflect.Method finalize = null;
      try {
        finalize = lib.getClass().getDeclaredMethod("finalize", new Class[0]);
      } catch (final NoSuchMethodException e) {
        throw new ValidatorManagerException(e);
      }
      if (finalize != null) {
        finalize.setAccessible(true);
        try {
          finalize.invoke(lib, new Object[0]);
        } catch (final IllegalAccessException e) {
          throw new ValidatorManagerException(e);
        } catch (final InvocationTargetException e) {
          throw new ValidatorManagerException(e);
        }
      }
    }
    return res;
  }
1230446
public final LoggingAdvisingAppendable setSanitizedContentDirectionality(@Nullable Dir contentDir)
      throws IOException {
    if (!contentDirSet) {
      contentDirSet = true;
      this.contentDir = contentDir;
      notifyContentDirectionality(contentDir);
    }
    return this;
  }
92067
protected boolean isIgnoredDir(File dir) {
        // ignoring the workspace and the artifacts directories. Both of them
        // are potentially large and they do not store any secrets.
        String n = dir.getName();
        return n.equals("workspace") || n.equals("artifacts")
            || n.equals("plugins") // no mutable data here
            || n.equals(".") || n.equals("..");
    }
327707
function _isDirectory (directory, callback) {

			if ("undefined" === typeof directory) {
				throw new ReferenceError("missing \"directory\" argument");
			}
				else if ("string" !== typeof directory) {
					throw new TypeError("\"directory\" argument is not a string");
				}
				else if ("" === directory.trim()) {
					throw new Error("\"directory\" argument is empty");
				}
			else if ("undefined" === typeof callback) {
				throw new ReferenceError("missing \"callback\" argument");
			}
				else if ("function" !== typeof callback) {
					throw new TypeError("\"callback\" argument is not a function");
				}
			else {

				lstat(directory, (err, stats) => {
					return callback(null, Boolean(!err && stats.isDirectory()));
				});

			}

		}
1316106
function() {
        var unrar = require("./lib/Unrar"),
            l_sFile = arguments[0],
            l_sOutputDir,
            l_aUnrarredFiles,
            l_oBuffer,
            l_oOptions;

        // check if output dir specified
        if (typeof(arguments[1]) === "string") {
            l_sOutputDir = arguments[1];
            l_oOptions = arguments[2] || {};
        } else {
            l_oOptions = arguments[1] || {};
        }

        _registerEvents(l_oOptions);
        l_oBuffer = fs.readFileSync(l_sFile);
        l_aUnrarredFiles = unrar(l_oBuffer);

        if (l_sOutputDir) {
            l_aUnrarredFiles = storeFilesToDiskSync(l_aUnrarredFiles, l_sOutputDir);
        }

        return l_aUnrarredFiles;
    }