Read the symbols from info file.
@return {Promise<Array>} Resolves with an array of symbol objects.
513096
async function getSymbols() {
  const info = await generateInfo();
  return info.symbols.filter(symbol => symbol.kind != 'member');
}
247884
function () {  $assert (__.seq (123), 123)
                        $assert (__.seq ([123, 333]), 333)
                        $assert (__.seq ( 123, 333 ), 333)
                        $assert (__.seq ([123, _.constant (333)]), 333)

                        $assert (__.seq ([_.constant (333)]), 333)

                        return [
                            __.seq ([Promise.resolve (123), Promise.resolve (333)]).assert (333),
                            __.seq ([123, __.constant (333)]).assert (333),
                            __.seq ([123, __.rejects ('foo')]).assertRejected ('foo'),
                            __.seq ([123, __.delays (0), _.appends ('bar')]).assert ('123bar')
                        ] }
796899
function read(file) {

    return new Promise(function (resolve, reject) {

      _fs2['default'].readFile(file, 'utf-8', function (err, fileContent) {
        if (err) reject(err);
        resolve(fileContent);
      });
    });
  }
282145
function readFiles() {
	/* jshint validthis:true */
	var self = this;

	async.waterfall([
		function(callback) {
			storeFileContent.init(self.options.testSrc, callback);
		},
		function(data, callback) {
			self.testFiles = data;
			storeFileContent.init(self.options.viewSrc, callback);
		},
		function(data, callback) {
			self.viewFiles = data;
			callback(null, 'success');
		}
	], function() {
		findElementSelectors.call(self);
	});
}
50111
function() {
        var self = this;

        self._modules = [];

        return new Promise(function(resolve, reject) {
            var base;
            var processors = [];

            if (self._options.base) {
                base = fs.readFileSync(path.resolve(self._options.base), 'utf8');
            }

            // For every file or folder, create a promise,
            // parse the file, extract the config and store it
            // to the global modules array.
            // Once all files are being processed, store the generated config.
            for (var i = 0; i < self._options.args.length; i++) {
                var file = self._options.args[i];

                var fileStats = fs.statSync(file);

                if (fileStats.isDirectory(file)) {
                    var walker = walk.walk(file, {
                        followLinks: false
                    });

                    walker.on('file', self._onWalkerFile.bind(self));

                    processors.push(self._onWalkerEnd(walker));
                } else if (fileStats.isFile()) {
                    processors.push(self._processFile(file));
                }
            }

            Promise.all(processors)
                .then(function(uselessPromises) {
                    return self._generateConfig();
                })
                .then(function(config) {
                    var content;

                    if (self._options.config) {
                        if (base) {
                            content = base + self._options.config + '.modules = ' + JSON.stringify(config) + ';';
                        } else {
                            content = 'var ' + self._options.config + ' = {modules: ' + JSON.stringify(config) + '};';
                        }
                    } else {
                        content = JSON.stringify(config);
                    }

                    return self._saveConfig(beautify(content));
                })
                .then(function(config) {
                    resolve(config);
                })
                .catch(function(error) {
                    reject(error);
                });
        });
    }
14549
public ImmutableList<Symbol> getFileAsSymbolList(String param) throws IOException {
    return FileUtils.loadSymbolList(Files.asCharSource(getExistingFile(param), Charsets.UTF_8));
  }
1030417
async function readFiles (locations) {
  return Promise.all(locations.map((location) => {
    return fs.readFile(location, 'utf-8')
  }))
}
260362
function readAndHashFiles(files) {
    const fileHashes = {};
    const fileContents = {};
    const promises = [];

    function readSingleFile(file) {
        return new Promise((resolve, reject) => {
            fs.readFile(file, (err, data) => {
                if (err) {
                    console.log(err);
                    reject(err);
                    return;
                }
                const hash = crypto.createHash('sha1');
                hash.update(data);
                const bufferHash = hash.digest();
                fileHashes[file] = bufferHash.toString('hex');
                if (file.endsWith('.js') && !file.endsWith('.test.js')) {
                    fileContents[file] = data.toString('utf8');
                }
                resolve();
            });
        });
    }

    files.forEach((file) => {
        promises.push(readSingleFile(file));
    });

    return new Promise((resolve, reject) => {
        Promise.all(promises)
            .then(() => {
                resolve({ files, fileContents, fileHashes });
            })
            .catch(reject);
    });
}
1325354
def resolve_symbols(self, tree, database, link_resolver):
        
        self.typed_symbols = self.__get_empty_typed_symbols()
        all_syms = OrderedSet()
        for sym_name in self.symbol_names:
            sym = database.get_symbol(sym_name)
            self.__query_extra_symbols(
                sym, all_syms, tree, link_resolver, database)

        if tree.project.is_toplevel:
            page_path = self.link.ref
        else:
            page_path = self.project_name + '/' + self.link.ref

        if self.meta.get("auto-sort", True):
            all_syms = sorted(all_syms, key=lambda x: x.unique_name)
        for sym in all_syms:
            sym.update_children_comments()
            self.__resolve_symbol(sym, link_resolver, page_path)
            self.symbol_names.add(sym.unique_name)

        # Always put symbols with no parent at the end
        no_parent_syms = self.by_parent_symbols.pop(None, None)
        if no_parent_syms:
            self.by_parent_symbols[None] = no_parent_syms

        for sym_type in [ClassSymbol, AliasSymbol, InterfaceSymbol,
                         StructSymbol]:
            syms = self.typed_symbols[sym_type].symbols

            if not syms:
                continue

            if self.title is None:
                self.title = syms[0].display_name
            if self.comment is None:
                self.comment = Comment(name=self.name)
                self.comment.short_description = syms[
                    0].comment.short_description
                self.comment.title = syms[0].comment.title
            break
1092266
function getSymNames(data, memo) {
    memo = memo || [];
    data.forEach(function (symbol) {
        // const longName = jsdocx.utils.getFullName(symbol);
        memo.push(symbol.$longname);
        if (!symbol.isEnum && symbol.$members) {
            memo = getSymNames(symbol.$members, memo);
        }
    });
    return memo;
}
397624
function resolvePromise(promise, state, value) {
        var onceWrapper = once();
        if (promise === value) {
            throw new TypeError(TYPE_ERROR);
        }
        if (promise[symbolState] === UNRESOLVED) {
            // should only get value.then once based on promise spec.
            var then = null;
            try {
                if (typeof value === 'object' || typeof value === 'function') {
                    then = value && value.then;
                }
            }
            catch (err) {
                onceWrapper(function () {
                    resolvePromise(promise, false, err);
                })();
                return promise;
            }
            // if (value instanceof ZoneAwarePromise) {
            if (state !== REJECTED && value instanceof ZoneAwarePromise &&
                value.hasOwnProperty(symbolState) && value.hasOwnProperty(symbolValue) &&
                value[symbolState] !== UNRESOLVED) {
                clearRejectedNoCatch(value);
                resolvePromise(promise, value[symbolState], value[symbolValue]);
            }
            else if (state !== REJECTED && typeof then === 'function') {
                try {
                    then.call(value, onceWrapper(makeResolver(promise, state)), onceWrapper(makeResolver(promise, false)));
                }
                catch (err) {
                    onceWrapper(function () {
                        resolvePromise(promise, false, err);
                    })();
                }
            }
            else {
                promise[symbolState] = state;
                var queue = promise[symbolValue];
                promise[symbolValue] = value;
                if (promise[symbolFinally] === symbolFinally) {
                    // the promise is generated by Promise.prototype.finally
                    if (state === RESOLVED) {
                        // the state is resolved, should ignore the value
                        // and use parent promise value
                        promise[symbolState] = promise[symbolParentPromiseState];
                        promise[symbolValue] = promise[symbolParentPromiseValue];
                    }
                }
                // record task information in value when error occurs, so we can
                // do some additional work such as render longStackTrace
                if (state === REJECTED && value instanceof Error) {
                    // check if longStackTraceZone is here
                    var trace = Zone.currentTask && Zone.currentTask.data &&
                        Zone.currentTask.data[creationTrace];
                    if (trace) {
                        // only keep the long stack trace into error when in longStackTraceZone
                        ObjectDefineProperty(value, CURRENT_TASK_TRACE_SYMBOL, { configurable: true, enumerable: false, writable: true, value: trace });
                    }
                }
                for (var i = 0; i < queue.length;) {
                    scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]);
                }
                if (queue.length == 0 && state == REJECTED) {
                    promise[symbolState] = REJECTED_NO_CATCH;
                    try {
                        // try to print more readable error log
                        throw new Error('Uncaught (in promise): ' + readableObjectToString(value) +
                            (value && value.stack ? '\n' + value.stack : ''));
                    }
                    catch (err) {
                        var error_1 = err;
                        error_1.rejection = value;
                        error_1.promise = promise;
                        error_1.zone = Zone.current;
                        error_1.task = Zone.currentTask;
                        _uncaughtPromiseErrors.push(error_1);
                        api.scheduleMicroTask(); // to make sure that it is running
                    }
                }
            }
        }
        // Resolving an already resolved promise is a noop.
        return promise;
    }
1292566
function fsRead(filePath) {
    return new Promise((resolve, reject) => {
        fs.readFile(filePath, (err, data) => {
            if (err) {
                if (err.syscall === 'open') {
                    console.log('Open "' + err.path +'" fail!')
                }
                reject(err);
            }
            resolve(data.toString())
        })
    })
}
45318
function (file) {
                var _this = this;
                return new Promise(function (resolve, reject) {
                    return __awaiter(_this, void 0, void 0, function () {
                        var imageSrc, err_3, img;
                        var _this = this;
                        return __generator(this, function (_a) {
                            switch (_a.label) {
                                case 0:
                                    _a.trys.push([0, 2, , 3]);
                                    return [4 /*yield*/, readFile()];
                                case 1:
                                    imageSrc = _a.sent();
                                    return [3 /*break*/, 3];
                                case 2:
                                    err_3 = _a.sent();
                                    reject(err_3);
                                    return [3 /*break*/, 3];
                                case 3:
                                    img = new Image();
                                    img.onload = function () {
                                        return __awaiter(_this, void 0, void 0, function () {
                                            var ctx, width, _a;
                                            return __generator(this, function (_b) {
                                                switch (_b.label) {
                                                    case 0:
                                                        // set edited image canvas and dimensions
                                                        this.editedImage = ( /** @type {?} */(document.createElement('canvas')));
                                                        this.editedImage.width = img.width;
                                                        this.editedImage.height = img.height;
                                                        ctx = this.editedImage.getContext('2d');
                                                        ctx.drawImage(img, 0, 0);
                                                        // resize image if larger than max image size
                                                        width = img.width > img.height ? img.height : img.width;
                                                        if (!(width > this.options.maxImageDimensions.width))
                                                            return [3 /*break*/, 2];
                                                        _a = this;
                                                        return [4 /*yield*/, this.resize(this.editedImage)];
                                                    case 1:
                                                        _a.editedImage = _b.sent();
                                                        _b.label = 2;
                                                    case 2:
                                                        this.imageDimensions.width = this.editedImage.width;
                                                        this.imageDimensions.height = this.editedImage.height;
                                                        this.setPreviewPaneDimensions(this.editedImage);
                                                        resolve();
                                                        return [2 /*return*/];
                                                }
                                            });
                                        });
                                    };
                                    img.src = imageSrc;
                                    return [2 /*return*/];
                            }
                        });
                    });
                });
                /**
                 * read file from input field
                 * @return {?}
                 */
                function readFile() {
                    return new Promise(function (resolve, reject) {
                        /** @type {?} */
                        var reader = new FileReader();
                        reader.onload = function (event) {
                            resolve(reader.result);
                        };
                        reader.onerror = function (err) {
                            reject(err);
                        };
                        reader.readAsDataURL(file);
                    });
                }
            }
1337954
function getInfo() {
				var collection = mRegistry[collectionName];
				var info = collection && collection[iconName];

				// convert raw data lazily to the icon info
				if (typeof info === 'number') {
					mRegistry[collectionName][iconName] = undefined; // avoid duplicate icon warning
					info = IconPool.addIcon(iconName, collectionName, {
						fontFamily: mFontRegistry[collectionName].config.fontFamily,
						content: info & 0xFFFF,
						suppressMirroring: !!(info & 0x10000),
						resourceBundle: getCoreResourceBundle()
					});
				}

				return info;
			}
537081
function(obj) {

        if (Array.isArray(obj)) {

            return {

                at: function(skip, pos) { return obj[pos] },
                rest: function(skip, pos) { return obj.slice(pos) }
            };
        }

        var iter = toObject(obj)[Symbol.iterator]();

        return {

            at: function(skip) {

                var r;

                while (skip--)
                    r = iter.next();

                return r.value;
            },

            rest: function(skip) {

                var a = [], r;

                while (--skip)
                    r = iter.next();

                while (r = iter.next(), !r.done)
                    a.push(r.value);

                return a;
            }
        };
    }
550458
function getFile(fn) {
	return new Promise((a, b) => _fs2.default.readFile(fn, 'utf-8', (e, d) => e ? b(e) : a(d)));
}
305273
function readCodepointsFromFile(){
			if (!o.codepointsFile) return {};
			if (!fs.existsSync(o.codepointsFile)){
				logger.verbose('Codepoints file not found');
				return {};
			}

			var buffer = fs.readFileSync(o.codepointsFile);
			return JSON.parse(buffer.toString());
		}