(function() {
  var fs, path;

  path = require('path');

  fs = require('fs-plus');

  module.exports = function(directoryPath) {
    var tagsFile;
    if (directoryPath == null) {
      return;
    }
    tagsFile = path.join(directoryPath, "tags");
    if (fs.isFileSync(tagsFile)) {
      return tagsFile;
    }
    tagsFile = path.join(directoryPath, "TAGS");
    if (fs.isFileSync(tagsFile)) {
      return tagsFile;
    }
    tagsFile = path.join(directoryPath, ".tags");
    if (fs.isFileSync(tagsFile)) {
      return tagsFile;
    }
    tagsFile = path.join(directoryPath, ".TAGS");
    if (fs.isFileSync(tagsFile)) {
      return tagsFile;
    }
  };

}).call(this);
