From d37d46dfbcedadeb439ad0367f8afcf8867dca43 Mon Sep 17 00:00:00 2001 From: "kenton@google.com" Date: Sat, 25 Apr 2009 02:53:47 +0000 Subject: Integrate recent changes from Google-internal code tree. See CHANGES.txt for details. --- src/google/protobuf/compiler/importer.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/google/protobuf/compiler/importer.h') diff --git a/src/google/protobuf/compiler/importer.h b/src/google/protobuf/compiler/importer.h index e2177e1c..7a2efc29 100644 --- a/src/google/protobuf/compiler/importer.h +++ b/src/google/protobuf/compiler/importer.h @@ -267,6 +267,11 @@ class LIBPROTOBUF_EXPORT DiskSourceTree : public SourceTree { string* virtual_file, string* shadowing_disk_file); + // Given a virtual path, find the path to the file on disk. + // Return true and update disk_file with the on-disk path if the file exists. + // Return false and leave disk_file untouched if the file doesn't exist. + bool VirtualFileToDiskFile(const string& virtual_file, string* disk_file); + // implements SourceTree ------------------------------------------- io::ZeroCopyInputStream* Open(const string& filename); @@ -280,6 +285,11 @@ class LIBPROTOBUF_EXPORT DiskSourceTree : public SourceTree { }; vector mappings_; + // Like Open(), but returns the on-disk path in disk_file if disk_file is + // non-NULL and the file could be successfully opened. + io::ZeroCopyInputStream* OpenVirtualFile(const string& virtual_file, + string* disk_file); + // Like Open() but given the actual on-disk path. io::ZeroCopyInputStream* OpenDiskFile(const string& filename); -- cgit v1.2.3