]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/StoreFileSystem.cc
ea71b4419b28c9c5fe49f58a7cdfba2151ba5af5
2 * Copyright (C) 1996-2025 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 /* DEBUG: section 92 Storage File System */
12 #include "StoreFileSystem.h"
14 std::vector
<StoreFileSystem
*> *StoreFileSystem::_FileSystems
= nullptr;
17 StoreFileSystem::FsAdd(StoreFileSystem
&instance
)
19 iterator i
= GetFileSystems().begin();
21 while (i
!= GetFileSystems().end()) {
22 assert(strcmp((*i
)->type(), instance
.type()) != 0);
26 GetFileSystems().push_back (&instance
);
29 std::vector
<StoreFileSystem
*> const &
30 StoreFileSystem::FileSystems()
32 return GetFileSystems();
35 std::vector
<StoreFileSystem
*> &
36 StoreFileSystem::GetFileSystems()
39 _FileSystems
= new std::vector
<StoreFileSystem
*>;
45 StoreFileSystem::FindByType(const char *type
)
47 for (const auto fs
: FileSystems()) {
48 if (strcasecmp(type
, fs
->type()) == 0)