2020-05-05 08:20:47 +08:00
|
|
|
/*
|
|
|
|
* Platform.actor.h
|
|
|
|
*
|
|
|
|
* This source file is part of the FoundationDB open source project
|
|
|
|
*
|
2022-03-22 04:36:23 +08:00
|
|
|
* Copyright 2013-2022 Apple Inc. and the FoundationDB project authors
|
2020-05-05 08:20:47 +08:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2021-03-11 02:06:03 +08:00
|
|
|
// When actually compiled (NO_INTELLISENSE), include the generated version of this file. In intellisense use the source
|
|
|
|
// version.
|
2020-05-05 08:20:47 +08:00
|
|
|
#if defined(NO_INTELLISENSE) && !defined(FLOW_PLATFORM_ACTOR_G_H)
|
2021-03-11 02:06:03 +08:00
|
|
|
#define FLOW_PLATFORM_ACTOR_G_H
|
|
|
|
#include "flow/Platform.actor.g.h"
|
2020-05-05 08:20:47 +08:00
|
|
|
#elif !defined(FLOW_PLATFORM_ACTOR_H)
|
2021-03-11 02:06:03 +08:00
|
|
|
#define FLOW_PLATFORM_ACTOR_H
|
2020-05-05 08:20:47 +08:00
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "flow/flow.h"
|
|
|
|
#include "flow/Platform.h"
|
2021-03-11 02:06:03 +08:00
|
|
|
#include "flow/actorcompiler.h" // This must be the last #include.
|
|
|
|
//
|
2021-09-17 08:42:34 +08:00
|
|
|
|
2020-05-21 09:14:29 +08:00
|
|
|
namespace platform {
|
2020-05-05 08:20:47 +08:00
|
|
|
// e.g. extension==".fdb", returns filenames relative to directory
|
2021-09-17 08:42:34 +08:00
|
|
|
Future<std::vector<std::string>> listFilesAsync(std::string const& directory, std::string const& extension = "");
|
2020-05-05 08:20:47 +08:00
|
|
|
|
|
|
|
// returns directory names relative to directory
|
2021-09-17 08:42:34 +08:00
|
|
|
Future<std::vector<std::string>> listDirectoriesAsync(std::string const& directory);
|
2020-05-05 08:20:47 +08:00
|
|
|
|
2021-09-17 08:42:34 +08:00
|
|
|
ACTOR Future<Void> findFilesRecursivelyAsync(std::string path, std::vector<std::string>* out);
|
2021-03-11 02:06:03 +08:00
|
|
|
} // namespace platform
|
2020-05-05 08:20:47 +08:00
|
|
|
|
|
|
|
#include "flow/unactorcompiler.h"
|
|
|
|
#endif
|