Create or get manifest object from |srcDirectory|.
330484
function (srcDirectory) {
  let manifest
  let manifestContent

  try {
    manifestContent = fs.readFileSync(path.join(srcDirectory, 'manifest.json'))
  } catch (readError) {
    console.warn(`Reading ${path.join(srcDirectory, 'manifest.json')} failed.`)
    console.warn(readError.stack || readError)
    throw readError
  }

  try {
    manifest = JSON.parse(manifestContent)
  } catch (parseError) {
    console.warn(`Parsing ${path.join(srcDirectory, 'manifest.json')} failed.`)
    console.warn(parseError.stack || parseError)
    throw parseError
  }

  if (!manifestNameMap[manifest.name]) {
    const extensionId = generateExtensionIdFromName(manifest.name)
    manifestMap[extensionId] = manifestNameMap[manifest.name] = manifest
    Object.assign(manifest, {
      srcDirectory: srcDirectory,
      extensionId: extensionId,
      // We can not use 'file://' directly because all resources in the extension
      // will be treated as relative to the root in Chrome.
      startPage: url.format({
        protocol: 'chrome-extension',
        slashes: true,
        hostname: extensionId,
        pathname: manifest.devtools_page
      })
    })
    return manifest
  } else if (manifest && manifest.name) {
    console.warn(`Attempted to load extension "${manifest.name}" that has already been loaded.`)
    return manifest
  }
}
933656
def create_manifest(self):
        """"""
        config_path = os.path.join(self.expt.control_path,
                                   DEFAULT_CONFIG_FNAME)

        self.manifest = []

        if os.path.isfile(config_path):
            self.manifest.append(config_path)

        for model in self.expt.models:
            config_files = model.config_files + model.optional_config_files

            self.manifest.extend(os.path.join(model.control_path, f)
                                 for f in config_files)

        # Add file manifests to runlog manifest
        for mf in self.expt.manifest:
            self.manifest.append(mf.path)
436142
private static void completeManifest(Manifest manifest, URL url) {

    String path = url.getPath();
    int start = 0;
    int end = path.length();
    if (path.endsWith(JAR_SUFFIX)) {
      // 4 for ".jar"
      end = end - JAR_SUFFIX.length() + 4;
      start = path.lastIndexOf('/', end) + 1;
    }
    String source = path.substring(start, end);
    manifest.getMainAttributes().put(MANIFEST_SOURCE, source);
  }
20476
def embedManifestDllCheck(target, source, env):
    """"""
    if env.get('WINDOWS_EMBED_MANIFEST', 0):
        manifestSrc = target[0].get_abspath() + '.manifest'
        if os.path.exists(manifestSrc):
            ret = (embedManifestDllAction) ([target[0]],None,env)        
            if ret:
                raise SCons.Errors.UserError("Unable to embed manifest into %s" % (target[0]))
            return ret
        else:
            print('(embed: no %s.manifest found; not embedding.)'%str(target[0]))
    return 0
1342544
def jarFlags(target, source, env, for_signature):
    """"""
    jarflags = env.subst('$JARFLAGS', target=target, source=source)
    for src in source:
        contents = src.get_text_contents()
        if contents[:16] == "Manifest-Version":
            if not 'm' in jarflags:
                return jarflags + 'm'
            break
    return jarflags
189723
def manifest_parse(self, path):
        ''''''
        print("fw: parsing manifests")
        content = open(path).read()
        return json.loads(content)
1200154
def create(cls, path):
        """"""
        try:
            os.makedirs(path)
        except OSError as e:
            if not e.errno == errno.EEXIST:
                raise
        cmd = [SVNADMIN, 'create', path]
        subprocess.check_call(cmd)
        return cls(path)
375083
def read_local_manifest(output_path):
    """"""
    local_manifest_path = get_local_manifest_path(output_path)
    try:
        with open(local_manifest_path, 'r') as f:
            manifest = dict(get_files_from_textfile(f))
            logging.debug('Retrieving %s elements from manifest', len(manifest))
            return manifest
    except IOError:
        logging.debug('No local manifest at %s', local_manifest_path)
        return {}
1127223
public function findManifests(){
        foreach ($this->src as $component => $source) {
            $src = $source[0]."/../manifest.php";
            if( file_exists($src) && is_readable($src) ){
                $this->manifests[$component] = $src;
            }
        }
    }
348952
def create_manifest_from_s3_files(self):
        
        for k in self.s3.list_objects(Bucket=self.sitename)['Contents']:
            key = k["Key"]
            files = []
            if key not in [self.manifest_file]:
                files.append(key)
            self._set_manifest_data(files)
686767
def initialize(self):
        
        if not os.path.exists(self.root_dir):
            os.makedirs(self.root_dir)
        assert os.path.isdir(self.root_dir), "%s is not a directory! Please move or remove it." % self.root_dir
        for d in ["bin", "lib", "include"]:
            target_path = os.path.join(self.root_dir, d)
            if not os.path.exists(target_path):
                os.makedirs(target_path)
        if not os.path.exists(self.manifest_path):
            open(self.manifest_path, "w+").close()
        self.new = False
1110520
private static Manifest getManifest(final RegisteredResource rsrc) throws IOException {
        try (final InputStream ins = rsrc.getInputStream()) {
            if (ins != null) {
                try (JarInputStream jis = new JarInputStream(ins)) {
                    return jis.getManifest();
                }
            } else {
                return null;
            }
        }
    }
658854
function generateManifest (manifest = {}) {
  var { url, title, description, type, author, links, web_root, fallback_page } = manifest
  if (isString(url)) manifest.url = url
  else delete manifest.url
  if (isString(title)) manifest.title = title
  else delete manifest.title
  if (isString(description)) manifest.description = description
  else delete manifest.description
  if (isString(type)) type = type.split(' ')
  if (isArrayOfStrings(type)) manifest.type = type
  else delete manifest.type
  if (isObject(links)) manifest.links = massageLinks(links)
  else delete manifest.links
  if (isString(web_root)) manifest.web_root = web_root
  else delete manifest.web_root
  if (isString(fallback_page)) manifest.fallback_page = fallback_page
  else delete manifest.fallback_page
  if (isString(author)) {
    if (author.startsWith('dat://') || DAT_HASH_REGEX.test(author)) {
      author = {url: author}
    } else {
      author = {name: author}
    }
  }
  if (isObject(author)) {
    manifest.author = {}
    if (isString(author.name)) manifest.author.name = author.name
    if (isString(author.url) && (author.url.startsWith('dat://') || DAT_HASH_REGEX.test(author.url))) {
      manifest.author.url = author.url
    }
  } else {
    delete manifest.author
  }
  return manifest
}
765624
def link(self, srcdir, duplicate):
        """"""
        self.srcdir = srcdir
        self.duplicate = duplicate
        self.__clearRepositoryCache(duplicate)
        srcdir.variant_dirs.append(self)
815348
def generate_manifest(self, progressbar=None):
        """"""
        items = dict()

        if progressbar:
            progressbar.label = "Generating manifest"

        for handle in self._storage_broker.iter_item_handles():
            key = dtoolcore.utils.generate_identifier(handle)
            value = self._storage_broker.item_properties(handle)
            items[key] = value
            if progressbar:
                progressbar.item_show_func = lambda x: handle
                progressbar.update(1)

        manifest = {
            "items": items,
            "dtoolcore_version": __version__,
            "hash_function": self._storage_broker.hasher.name
        }

        return manifest
1010621
def find_manifests(self):
        ''''''
        manifest_dir = mp_util.dot_mavproxy()

        ret = []
        for file in os.listdir(manifest_dir):
            try:
                file.index("manifest")
                ret.append(os.path.join(manifest_dir,file))
            except ValueError:
                pass
        return ret
1319352
def Dir(self, name, create=True):
        """"""
        return self.dir.Dir(name, create=create)