1 // -*- mode: cpp; mode: fold -*-
3 // $Id: acquire-item.h,v 1.26.2.3 2004/01/02 18:51:00 mdz Exp $
4 /* ######################################################################
6 Acquire Item - Item to acquire
8 When an item is instantiated it will add it self to the local list in
9 the Owner Acquire class. Derived classes will then call QueueURI to
10 register all the URI's they wish to fetch at the initial moment.
12 Three item classes are provided to provide functionality for
13 downloading of Index, Translation and Packages files.
15 A Archive class is provided for downloading .deb files. It does Hash
16 checking and source location as well as a retry algorithm.
18 ##################################################################### */
20 #ifndef PKGLIB_ACQUIRE_ITEM_H
21 #define PKGLIB_ACQUIRE_ITEM_H
23 #include <apt-pkg/acquire.h>
24 #include <apt-pkg/indexfile.h>
25 #include <apt-pkg/vendor.h>
26 #include <apt-pkg/sourcelist.h>
27 #include <apt-pkg/pkgrecords.h>
28 #include <apt-pkg/indexrecords.h>
29 #include <apt-pkg/hashes.h>
30 #include <apt-pkg/weakptr.h>
32 /** \addtogroup acquire
35 * \file acquire-item.h
38 /** \brief Represents the process by which a pkgAcquire object should {{{
39 * retrieve a file or a collection of files.
41 * By convention, Item subclasses should insert themselves into the
42 * acquire queue when they are created by calling QueueURI(), and
43 * remove themselves by calling Dequeue() when either Done() or
44 * Failed() is invoked. Item objects are also responsible for
45 * notifying the download progress indicator (accessible via
46 * #Owner->Log) of their status.
50 class pkgAcquire::Item
: public WeakPointable
54 /** \brief The acquire object with which this item is associated. */
57 /** \brief Insert this item into its owner's queue.
59 * \param ItemDesc Metadata about this item (its URI and
62 inline void QueueURI(ItemDesc
&Item
)
63 {Owner
->Enqueue(Item
);};
65 /** \brief Remove this item from its owner's queue. */
66 inline void Dequeue() {Owner
->Dequeue(this);};
68 /** \brief Rename a file without modifying its timestamp.
70 * Many item methods call this as their final action.
72 * \param From The file to be renamed.
74 * \param To The new name of #From. If #To exists it will be
77 void Rename(string From
,string To
);
81 /** \brief The current status of this item. */
84 /** \brief The item is waiting to be downloaded. */
87 /** \brief The item is currently being downloaded. */
90 /** \brief The item has been successfully downloaded. */
93 /** \brief An error was encountered while downloading this
98 /** \brief The item was downloaded but its authenticity could
103 /** \brief The item was could not be downloaded because of
104 * a transient network error (e.g. network down)
106 StatTransientNetworkError
109 /** \brief Contains a textual description of the error encountered
110 * if #Status is #StatError or #StatAuthError.
114 /** \brief The size of the object to fetch. */
115 unsigned long FileSize
;
117 /** \brief How much of the object was already fetched. */
118 unsigned long PartialSize
;
120 /** \brief If not \b NULL, contains the name of a subprocess that
121 * is operating on this object (for instance, "gzip" or "gpgv").
125 /** \brief A client-supplied unique identifier.
127 * This field is initalized to 0; it is meant to be filled in by
128 * clients that wish to use it to uniquely identify items.
130 * \todo it's unused in apt itself
134 /** \brief If \b true, the entire object has been successfully fetched.
136 * Subclasses should set this to \b true when appropriate.
140 /** \brief If \b true, the URI of this object is "local".
142 * The only effect of this field is to exclude the object from the
143 * download progress indicator's overall statistics.
147 /** \brief The number of fetch queues into which this item has been
150 * There is one queue for each source from which an item could be
155 unsigned int QueueCounter
;
157 /** \brief The name of the file into which the retrieved object
162 /** \brief Invoked by the acquire worker when the object couldn't
165 * This is a branch of the continuation of the fetch process.
167 * \param Message An RFC822-formatted message from the acquire
168 * method describing what went wrong. Use LookupTag() to parse
171 * \param Cnf The method via which the worker tried to fetch this object.
175 virtual void Failed(string Message
,pkgAcquire::MethodConfig
*Cnf
);
177 /** \brief Invoked by the acquire worker when the object was
178 * fetched successfully.
180 * Note that the object might \e not have been written to
181 * DestFile; check for the presence of an Alt-Filename entry in
182 * Message to find the file to which it was really written.
184 * Done is often used to switch from one stage of the processing
185 * to the next (e.g. fetching, unpacking, copying). It is one
186 * branch of the continuation of the fetch process.
188 * \param Message Data from the acquire method. Use LookupTag()
190 * \param Size The size of the object that was fetched.
191 * \param Hash The HashSum of the object that was fetched.
192 * \param Cnf The method via which the object was fetched.
196 virtual void Done(string Message
,unsigned long Size
,string Hash
,
197 pkgAcquire::MethodConfig
*Cnf
);
199 /** \brief Invoked when the worker starts to fetch this object.
201 * \param Message RFC822-formatted data from the worker process.
202 * Use LookupTag() to parse it.
204 * \param Size The size of the object being fetched.
208 virtual void Start(string Message
,unsigned long Size
);
210 /** \brief Custom headers to be sent to the fetch process.
212 * \return a string containing RFC822-style headers that are to be
213 * inserted into the 600 URI Acquire message sent to the fetch
214 * subprocess. The headers are inserted after a newline-less
215 * line, so they should (if nonempty) have a leading newline and
216 * no trailing newline.
218 virtual string
Custom600Headers() {return string();};
220 /** \brief A "descriptive" URI-like string.
222 * \return a URI that should be used to describe what is being fetched.
224 virtual string
DescURI() = 0;
225 /** \brief Short item description.
227 * \return a brief description of the object being fetched.
229 virtual string
ShortDesc() {return DescURI();}
231 /** \brief Invoked by the worker when the download is completely done. */
232 virtual void Finished() {};
236 * \return the HashSum of this object, if applicable; otherwise, an
239 virtual string
HashSum() {return string();};
241 /** \return the acquire process with which this item is associated. */
242 pkgAcquire
*GetOwner() {return Owner
;};
244 /** \return \b true if this object is being fetched from a trusted source. */
245 virtual bool IsTrusted() {return false;};
247 /** \brief Initialize an item.
249 * Adds the item to the list of items known to the acquire
250 * process, but does not place it into any fetch queues (you must
251 * manually invoke QueueURI() to do so).
253 * Initializes all fields of the item other than Owner to 0,
254 * false, or the empty string.
256 * \param Owner The new owner of this item.
258 Item(pkgAcquire
*Owner
);
260 /** \brief Remove this item from its owner's queue by invoking
261 * pkgAcquire::Remove.
266 /** \brief Information about an index patch (aka diff). */ /*{{{*/
268 /** The filename of the diff. */
271 /** The sha1 hash of the diff. */
274 /** The size of the diff. */
278 /** \brief An item that is responsible for fetching an index file of {{{
279 * package list diffs and starting the package list's download.
281 * This item downloads the Index file and parses it, then enqueues
282 * additional downloads of either the individual patches (using
283 * pkgAcqIndexDiffs) or the entire Packages file (using pkgAcqIndex).
285 * \sa pkgAcqIndexDiffs, pkgAcqIndex
287 class pkgAcqDiffIndex
: public pkgAcquire::Item
290 /** \brief If \b true, debugging information will be written to std::clog. */
293 /** \brief The item that is currently being downloaded. */
294 pkgAcquire::ItemDesc Desc
;
296 /** \brief The URI of the index file to recreate at our end (either
297 * by downloading it or by applying partial patches).
301 /** \brief The Hash that the real index file should have after
302 * all patches have been applied.
304 HashString ExpectedHash
;
306 /** \brief The index file which will be patched to generate the new
309 string CurrentPackagesFile
;
311 /** \brief A description of the Packages file (stored in
312 * pkgAcquire::ItemDesc::Description).
317 // Specialized action members
318 virtual void Failed(string Message
,pkgAcquire::MethodConfig
*Cnf
);
319 virtual void Done(string Message
,unsigned long Size
,string Md5Hash
,
320 pkgAcquire::MethodConfig
*Cnf
);
321 virtual string
DescURI() {return RealURI
+ "Index";};
322 virtual string
Custom600Headers();
324 /** \brief Parse the Index file for a set of Packages diffs.
326 * Parses the Index file and creates additional download items as
329 * \param IndexDiffFile The name of the Index file.
331 * \return \b true if the Index file was successfully parsed, \b
334 bool ParseDiffIndex(string IndexDiffFile
);
337 /** \brief Create a new pkgAcqDiffIndex.
339 * \param Owner The Acquire object that owns this item.
341 * \param URI The URI of the list file to download.
343 * \param URIDesc A long description of the list file to download.
345 * \param ShortDesc A short description of the list file to download.
347 * \param ExpectedHash The list file's MD5 signature.
349 pkgAcqDiffIndex(pkgAcquire
*Owner
,string URI
,string URIDesc
,
350 string ShortDesc
, HashString ExpectedHash
);
353 /** \brief An item that is responsible for fetching all the patches {{{
354 * that need to be applied to a given package index file.
356 * After downloading and applying a single patch, this item will
357 * enqueue a new pkgAcqIndexDiffs to download and apply the remaining
358 * patches. If no patch can be found that applies to an intermediate
359 * file or if one of the patches cannot be downloaded, falls back to
360 * downloading the entire package index file using pkgAcqIndex.
362 * \sa pkgAcqDiffIndex, pkgAcqIndex
364 class pkgAcqIndexDiffs
: public pkgAcquire::Item
368 /** \brief Queue up the next diff download.
370 * Search for the next available diff that applies to the file
371 * that currently exists on disk, and enqueue it by calling
374 * \return \b true if an applicable diff was found, \b false
377 bool QueueNextDiff();
379 /** \brief Handle tasks that must be performed after the item
380 * finishes downloading.
382 * Dequeues the item and checks the resulting file's md5sum
383 * against ExpectedHash after the last patch was applied.
384 * There is no need to check the md5/sha1 after a "normal"
385 * patch because QueueNextDiff() will check the sha1 later.
387 * \param allDone If \b true, the file was entirely reconstructed,
388 * and its md5sum is verified.
390 void Finish(bool allDone
=false);
394 /** \brief If \b true, debugging output will be written to
399 /** \brief A description of the item that is currently being
402 pkgAcquire::ItemDesc Desc
;
404 /** \brief The URI of the package index file that is being
409 /** \brief The HashSum of the package index file that is being
412 HashString ExpectedHash
;
414 /** A description of the file being downloaded. */
417 /** The patches that remain to be downloaded, including the patch
418 * being downloaded right now. This list should be ordered so
419 * that each diff appears before any diff that depends on it.
421 * \todo These are indexed by sha1sum; why not use some sort of
422 * dictionary instead of relying on ordering and stripping them
425 vector
<DiffInfo
> available_patches
;
427 /** Stop applying patches when reaching that sha1 */
430 /** The current status of this patch. */
433 /** \brief The diff is in an unknown state. */
436 /** \brief The diff is currently being fetched. */
439 /** \brief The diff is currently being uncompressed. */
442 /** \brief The diff is currently being applied. */
448 /** \brief Called when the patch file failed to be downloaded.
450 * This method will fall back to downloading the whole index file
451 * outright; its arguments are ignored.
453 virtual void Failed(string Message
,pkgAcquire::MethodConfig
*Cnf
);
455 virtual void Done(string Message
,unsigned long Size
,string Md5Hash
,
456 pkgAcquire::MethodConfig
*Cnf
);
457 virtual string
DescURI() {return RealURI
+ "Index";};
459 /** \brief Create an index diff item.
461 * After filling in its basic fields, this invokes Finish(true) if
462 * #diffs is empty, or QueueNextDiff() otherwise.
464 * \param Owner The pkgAcquire object that owns this item.
466 * \param URI The URI of the package index file being
469 * \param URIDesc A long description of this item.
471 * \param ShortDesc A brief description of this item.
473 * \param ExpectedHash The expected md5sum of the completely
474 * reconstructed package index file; the index file will be tested
475 * against this value when it is entirely reconstructed.
477 * \param diffs The remaining diffs from the index of diffs. They
478 * should be ordered so that each diff appears before any diff
479 * that depends on it.
481 pkgAcqIndexDiffs(pkgAcquire
*Owner
,string URI
,string URIDesc
,
482 string ShortDesc
, HashString ExpectedHash
,
484 vector
<DiffInfo
> diffs
=vector
<DiffInfo
>());
487 /** \brief An acquire item that is responsible for fetching an index {{{
488 * file (e.g., Packages or Sources).
490 * \sa pkgAcqDiffIndex, pkgAcqIndexDiffs, pkgAcqIndexTrans
492 * \todo Why does pkgAcqIndex have protected members?
494 class pkgAcqIndex
: public pkgAcquire::Item
498 /** \brief If \b true, the index file has been decompressed. */
501 /** \brief If \b true, the partially downloaded file will be
502 * removed when the download completes.
506 /** \brief The download request that is currently being
509 pkgAcquire::ItemDesc Desc
;
511 /** \brief The object that is actually being fetched (minus any
512 * compression-related extensions).
516 /** \brief The expected hashsum of the decompressed index file. */
517 HashString ExpectedHash
;
519 /** \brief The compression-related file extension that is being
520 * added to the downloaded file (e.g., ".gz" or ".bz2").
522 string CompressionExtension
;
526 // Specialized action members
527 virtual void Failed(string Message
,pkgAcquire::MethodConfig
*Cnf
);
528 virtual void Done(string Message
,unsigned long Size
,string Md5Hash
,
529 pkgAcquire::MethodConfig
*Cnf
);
530 virtual string
Custom600Headers();
531 virtual string
DescURI() {return RealURI
+ CompressionExtension
;};
532 virtual string
HashSum() {return ExpectedHash
.toStr(); };
534 /** \brief Create a pkgAcqIndex.
536 * \param Owner The pkgAcquire object with which this item is
539 * \param URI The URI of the index file that is to be downloaded.
541 * \param URIDesc A "URI-style" description of this index file.
543 * \param ShortDesc A brief description of this index file.
545 * \param ExpectedHash The expected hashsum of this index file.
547 * \param compressExt The compression-related extension with which
548 * this index file should be downloaded, or "" to autodetect
549 * Compression types can be set with config Acquire::CompressionTypes,
550 * default is ".lzma" or ".bz2" (if the needed binaries are present)
551 * fallback is ".gz" or none.
553 pkgAcqIndex(pkgAcquire
*Owner
,string URI
,string URIDesc
,
554 string ShortDesc
, HashString ExpectedHash
, string compressExt
="");
557 /** \brief An acquire item that is responsible for fetching a {{{
558 * translated index file.
560 * The only difference from pkgAcqIndex is that transient failures
561 * are suppressed: no error occurs if the translated index file is
564 class pkgAcqIndexTrans
: public pkgAcqIndex
568 virtual void Failed(string Message
,pkgAcquire::MethodConfig
*Cnf
);
570 /** \brief Create a pkgAcqIndexTrans.
572 * \param Owner The pkgAcquire object with which this item is
575 * \param URI The URI of the index file that is to be downloaded.
577 * \param URIDesc A "URI-style" description of this index file.
579 * \param ShortDesc A brief description of this index file.
581 pkgAcqIndexTrans(pkgAcquire
*Owner
,string URI
,string URIDesc
,
585 /** \brief Information about an index file. */ /*{{{*/
588 /** \brief A URI from which the index file can be downloaded. */
591 /** \brief A description of the index file. */
594 /** \brief A shorter description of the index file. */
597 /** \brief The key by which this index file should be
598 * looked up within the meta signature file.
603 /** \brief An acquire item that downloads the detached signature {{{
604 * of a meta-index (Release) file, then queues up the release
607 * \todo Why protected members?
609 * \sa pkgAcqMetaIndex
611 class pkgAcqMetaSig
: public pkgAcquire::Item
614 /** \brief The last good signature file */
618 /** \brief The fetch request that is currently being processed. */
619 pkgAcquire::ItemDesc Desc
;
621 /** \brief The URI of the signature file. Unlike Desc.URI, this is
622 * never modified; it is used to determine the file that is being
627 /** \brief The URI of the meta-index file to be fetched after the signature. */
630 /** \brief A "URI-style" description of the meta-index file to be
631 * fetched after the signature.
633 string MetaIndexURIDesc
;
635 /** \brief A brief description of the meta-index file to be fetched
636 * after the signature.
638 string MetaIndexShortDesc
;
640 /** \brief A package-system-specific parser for the meta-index file. */
641 indexRecords
* MetaIndexParser
;
643 /** \brief The index files which should be looked up in the meta-index
644 * and then downloaded.
646 * \todo Why a list of pointers instead of a list of structs?
648 const vector
<struct IndexTarget
*>* IndexTargets
;
652 // Specialized action members
653 virtual void Failed(string Message
,pkgAcquire::MethodConfig
*Cnf
);
654 virtual void Done(string Message
,unsigned long Size
,string Md5Hash
,
655 pkgAcquire::MethodConfig
*Cnf
);
656 virtual string
Custom600Headers();
657 virtual string
DescURI() {return RealURI
; };
659 /** \brief Create a new pkgAcqMetaSig. */
660 pkgAcqMetaSig(pkgAcquire
*Owner
,string URI
,string URIDesc
, string ShortDesc
,
661 string MetaIndexURI
, string MetaIndexURIDesc
, string MetaIndexShortDesc
,
662 const vector
<struct IndexTarget
*>* IndexTargets
,
663 indexRecords
* MetaIndexParser
);
666 /** \brief An item that is responsible for downloading the meta-index {{{
667 * file (i.e., Release) itself and verifying its signature.
669 * Once the download and verification are complete, the downloads of
670 * the individual index files are queued up using pkgAcqDiffIndex.
671 * If the meta-index file had a valid signature, the expected hashsums
672 * of the index files will be the md5sums listed in the meta-index;
673 * otherwise, the expected hashsums will be "" (causing the
674 * authentication of the index files to be bypassed).
676 class pkgAcqMetaIndex
: public pkgAcquire::Item
679 /** \brief The fetch command that is currently being processed. */
680 pkgAcquire::ItemDesc Desc
;
682 /** \brief The URI that is actually being downloaded; never
683 * modified by pkgAcqMetaIndex.
687 /** \brief The file in which the signature for this index was stored.
689 * If empty, the signature and the md5sums of the individual
690 * indices will not be checked.
694 /** \brief The index files to download. */
695 const vector
<struct IndexTarget
*>* IndexTargets
;
697 /** \brief The parser for the meta-index file. */
698 indexRecords
* MetaIndexParser
;
700 /** \brief If \b true, the index's signature is currently being verified.
703 // required to deal gracefully with problems caused by incorrect ims hits
706 /** \brief Check that the release file is a release file for the
707 * correct distribution.
709 * \return \b true if no fatal errors were encountered.
711 bool VerifyVendor(string Message
);
713 /** \brief Called when a file is finished being retrieved.
715 * If the file was not downloaded to DestFile, a copy process is
716 * set up to copy it to DestFile; otherwise, Complete is set to \b
717 * true and the file is moved to its final location.
719 * \param Message The message block received from the fetch
722 void RetrievalDone(string Message
);
724 /** \brief Called when authentication succeeded.
726 * Sanity-checks the authenticated file, queues up the individual
727 * index files for download, and saves the signature in the lists
728 * directory next to the authenticated list file.
730 * \param Message The message block received from the fetch
733 void AuthDone(string Message
);
735 /** \brief Starts downloading the individual index files.
737 * \param verify If \b true, only indices whose expected hashsum
738 * can be determined from the meta-index will be downloaded, and
739 * the hashsums of indices will be checked (reporting
740 * #StatAuthError if there is a mismatch). If verify is \b false,
741 * no hashsum checking will be performed.
743 void QueueIndexes(bool verify
);
747 // Specialized action members
748 virtual void Failed(string Message
,pkgAcquire::MethodConfig
*Cnf
);
749 virtual void Done(string Message
,unsigned long Size
, string Hash
,
750 pkgAcquire::MethodConfig
*Cnf
);
751 virtual string
Custom600Headers();
752 virtual string
DescURI() {return RealURI
; };
754 /** \brief Create a new pkgAcqMetaIndex. */
755 pkgAcqMetaIndex(pkgAcquire
*Owner
,
756 string URI
,string URIDesc
, string ShortDesc
,
758 const vector
<struct IndexTarget
*>* IndexTargets
,
759 indexRecords
* MetaIndexParser
);
762 /** \brief An item that is responsible for fetching a package file. {{{
764 * If the package file already exists in the cache, nothing will be
767 class pkgAcqArchive
: public pkgAcquire::Item
770 /** \brief The package version being fetched. */
771 pkgCache::VerIterator Version
;
773 /** \brief The fetch command that is currently being processed. */
774 pkgAcquire::ItemDesc Desc
;
776 /** \brief The list of sources from which to pick archives to
777 * download this package from.
779 pkgSourceList
*Sources
;
781 /** \brief A package records object, used to look up the file
782 * corresponding to each version of the package.
786 /** \brief The hashsum of this package. */
787 HashString ExpectedHash
;
789 /** \brief A location in which the actual filename of the package
792 string
&StoreFilename
;
794 /** \brief The next file for this version to try to download. */
795 pkgCache::VerFileIterator Vf
;
797 /** \brief How many (more) times to try to find a new source from
798 * which to download this package version if it fails.
800 * Set from Acquire::Retries.
802 unsigned int Retries
;
804 /** \brief \b true if this version file is being downloaded from a
809 /** \brief Queue up the next available file for this version. */
814 virtual void Failed(string Message
,pkgAcquire::MethodConfig
*Cnf
);
815 virtual void Done(string Message
,unsigned long Size
,string Hash
,
816 pkgAcquire::MethodConfig
*Cnf
);
817 virtual string
DescURI() {return Desc
.URI
;};
818 virtual string
ShortDesc() {return Desc
.ShortDesc
;};
819 virtual void Finished();
820 virtual string
HashSum() {return ExpectedHash
.toStr(); };
821 virtual bool IsTrusted();
823 /** \brief Create a new pkgAcqArchive.
825 * \param Owner The pkgAcquire object with which this item is
828 * \param Sources The sources from which to download version
831 * \param Recs A package records object, used to look up the file
832 * corresponding to each version of the package.
834 * \param Version The package version to download.
836 * \param StoreFilename A location in which the actual filename of
837 * the package should be stored. It will be set to a guessed
838 * basename in the constructor, and filled in with a fully
839 * qualified filename once the download finishes.
841 pkgAcqArchive(pkgAcquire
*Owner
,pkgSourceList
*Sources
,
842 pkgRecords
*Recs
,pkgCache::VerIterator
const &Version
,
843 string
&StoreFilename
);
846 /** \brief Retrieve an arbitrary file to the current directory. {{{
848 * The file is retrieved even if it is accessed via a URL type that
849 * normally is a NOP, such as "file". If the download fails, the
850 * partial file is renamed to get a ".FAILED" extension.
852 class pkgAcqFile
: public pkgAcquire::Item
854 /** \brief The currently active download process. */
855 pkgAcquire::ItemDesc Desc
;
857 /** \brief The hashsum of the file to download, if it is known. */
858 HashString ExpectedHash
;
860 /** \brief How many times to retry the download, set from
863 unsigned int Retries
;
865 /** \brief Should this file be considered a index file */
870 // Specialized action members
871 virtual void Failed(string Message
,pkgAcquire::MethodConfig
*Cnf
);
872 virtual void Done(string Message
,unsigned long Size
,string CalcHash
,
873 pkgAcquire::MethodConfig
*Cnf
);
874 virtual string
DescURI() {return Desc
.URI
;};
875 virtual string
HashSum() {return ExpectedHash
.toStr(); };
876 virtual string
Custom600Headers();
878 /** \brief Create a new pkgAcqFile object.
880 * \param Owner The pkgAcquire object with which this object is
883 * \param URI The URI to download.
885 * \param Hash The hashsum of the file to download, if it is known;
888 * \param Size The size of the file to download, if it is known;
891 * \param Desc A description of the file being downloaded.
893 * \param ShortDesc A brief description of the file being
896 * \param DestDir The directory the file should be downloaded into.
898 * \param DestFilename The filename+path the file is downloaded to.
900 * \param IsIndexFile The file is considered a IndexFile and cache-control
901 * headers like "cache-control: max-age=0" are send
903 * If DestFilename is empty, download to DestDir/<basename> if
904 * DestDir is non-empty, $CWD/<basename> otherwise. If
905 * DestFilename is NOT empty, DestDir is ignored and DestFilename
906 * is the absolute name to which the file should be downloaded.
909 pkgAcqFile(pkgAcquire
*Owner
, string URI
, string Hash
, unsigned long Size
,
910 string Desc
, string ShortDesc
,
911 const string
&DestDir
="", const string
&DestFilename
="",
912 bool IsIndexFile
=false);