FileSystemIndexer v0.1.2-beta
File System Indexer - An API to index files from your system
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
2
4
6
7#include "ciof/ciof.hpp"
8
9namespace
10{
12 {
13 return ciof::format("%1/%2/%3 - %4:%5:%6.%7",
14 time.year, time.month, time.day,
15 time.hour, time.min, time.sec, time.ms
16 );
17 }
18}
19
20int main()
21{
22 ciof::print(FSI_temperatureConvertCelTo("f", 33));
23 ciof::print(FSI_temperatureConvertCelFrom("f", 33));
24
25 fsi::Indexer indexer("main-indexer", true);
26
27 {
29 info.path = ".";
30 info.id = "current-dir";
31
32 indexer.addExtendedInfo(info);
33 }
34
35 for (const auto &x : indexer.searchMatching("cpp"))
36 {
37 ciof::print("FILE NAME: %1 -- %2", x, __timeToStr(indexer.getFileDTInfo(x)));
38 }
39
40 ciof::print("ID `current-dir` has path: %1", indexer.findIndex("current-dir").path);
41
42 return 0;
43}
44
double FSI_temperatureConvertCelFrom(const char *to, const double from)
Convert from from to Celcius as a double.
double FSI_temperatureConvertCelTo(const char *from, const double to)
Convert Celcius to from as a double.
IndexerInfo findIndex(const std::string &toFind)
Find the index from the vector database from the indexer.
utils::TimeUtils_DateTime getFileDTInfo(const std::string &path)
Get when the file, dir or symlink was last modified.
std::vector< std::string > searchMatching(const std::string &path)
Either use threaded or unthreaded search matching.
IndexerError addExtendedInfo(const IndexerInfo &info)
Add the exact path and the sub-paths to have the info from;.
int main()
Definition main.cpp:20
std::string __timeToStr(const fsi::utils::TimeUtils_DateTime &time)
Definition main.cpp:11
std::string path