Make fs.readdir support asar package.

This commit is contained in:
Cheng Zhao 2014-09-24 18:44:00 +08:00
parent 9f9d209e3d
commit 0cab034dab
4 changed files with 80 additions and 12 deletions

View file

@ -5,6 +5,8 @@
#ifndef ATOM_COMMON_ASAR_ARCHIVE_H_
#define ATOM_COMMON_ASAR_ARCHIVE_H_
#include <vector>
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
@ -41,6 +43,9 @@ class Archive : public base::RefCounted<Archive> {
// Fs.stat(path).
bool Stat(const base::FilePath& path, Stats* stats);
// Fs.readdir(path).
bool Readdir(const base::FilePath& path, std::vector<base::FilePath>* files);
base::FilePath path() const { return path_; }
base::DictionaryValue* header() const { return header_.get(); }