MiKTeX
26.5-next
A scalable TeX distribution
Loading...
Searching...
No Matches
Libraries
MiKTeX
Core
include
miktex
Core
Fndb.h
1
/* miktex/Core/Fndb.h: -*- C++ -*-
2
3
Copyright (C) 1996-2021 Christian Schenk
4
5
This file is part of the MiKTeX Core Library.
6
7
The MiKTeX Core Library is free software; you can redistribute it
8
and/or modify it under the terms of the GNU General Public License
9
as published by the Free Software Foundation; either version 2, or
10
(at your option) any later version.
11
12
The MiKTeX Core Library is distributed in the hope that it will be
13
useful, but WITHOUT ANY WARRANTY; without even the implied warranty
14
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
16
17
You should have received a copy of the GNU General Public License
18
along with the MiKTeX Core Library; if not, write to the Free
19
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20
02111-1307, USA. */
21
22
#pragma once
23
24
#if !defined(BFCDDE5CC44547308426241D426A676E)
25
#define BFCDDE5CC44547308426241D426A676E
26
27
#include <miktex/Core/config.h>
28
29
#include <string>
30
#include <vector>
31
32
#include <miktex/Util/PathName>
33
34
MIKTEX_CORE_BEGIN_NAMESPACE;
35
36
class
MIKTEXNOVTABLE
ICreateFndbCallback
37
{
38
public
:
39
virtual
bool
MIKTEXTHISCALL ReadDirectory(
const
MiKTeX::Util::PathName
& path, std::vector<std::string>& subDirNames, std::vector<std::string>& fileNames, std::vector<std::string>& fileNameInfos) = 0;
40
41
public
:
42
virtual
bool
MIKTEXTHISCALL OnProgress(
unsigned
level,
const
MiKTeX::Util::PathName
& directory) = 0;
43
};
44
45
class
MIKTEXNOVTABLE Fndb
46
{
47
public
:
48
Fndb() =
delete
;
49
50
public
:
51
Fndb(
const
Fndb& other) =
delete
;
52
53
public
:
54
Fndb& operator=(
const
Fndb& other) =
delete
;
55
56
public
:
57
Fndb(Fndb&& other) =
delete
;
58
59
public
:
60
Fndb& operator= (Fndb&& other) =
delete
;
61
62
public
:
63
~Fndb() =
delete
;
64
65
public
:
66
struct
Record
67
{
68
MiKTeX::Util::PathName
path;
69
std::string fileNameInfo;
70
};
71
72
public
:
73
static
MIKTEXCORECEEAPI(
bool
) Create(
const
MiKTeX::Util::PathName
& fndbPath,
const
MiKTeX::Util::PathName
& rootPath,
ICreateFndbCallback
* callback);
74
75
public
:
76
static
MIKTEXCORECEEAPI(
bool
) Create(
const
MiKTeX::Util::PathName
& fndbPath,
const
MiKTeX::Util::PathName
& rootPath,
ICreateFndbCallback
* callback,
bool
enableStringPooling,
bool
storeFileNameInfo);
77
78
public
:
79
static
MIKTEXCORECEEAPI(
bool
) Search(
const
MiKTeX::Util::PathName
& fileName,
const
std::string& pathPattern,
bool
all, std::vector<Record>& result);
80
81
public
:
82
static
MIKTEXCORECEEAPI(
void
) Add(
const
std::vector<Record>& records);
83
84
public
:
85
static
MIKTEXCORECEEAPI(
void
) Remove(
const
std::vector<MiKTeX::Util::PathName>& paths);
86
87
public
:
88
static
MIKTEXCORECEEAPI(
bool
) FileExists(
const
MiKTeX::Util::PathName
& path);
89
90
public
:
91
static
MIKTEXCORECEEAPI(
bool
) Refresh(
const
MiKTeX::Util::PathName
& path,
ICreateFndbCallback
* callback);
92
93
public
:
94
static
MIKTEXCORECEEAPI(
bool
) Refresh(
ICreateFndbCallback
* callback);
95
96
};
97
98
MIKTEX_CORE_END_NAMESPACE;
99
100
#endif
MiKTeX::Core::ICreateFndbCallback
Definition
Fndb.h:37
MiKTeX::Util::PathName
Instances of this class can be used to store path names.
Definition
PathName.h:64
MiKTeX::Core::Fndb::Record
Definition
Fndb.h:67
Generated by
1.14.0