Apache OpenDALâ„¢ C++ Binding
The C++ binding for Apache OpenDALâ„¢
Loading...
Searching...
No Matches
data_structure.hpp
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20#pragma once
21
22#include <cstdint>
23#include <optional>
24#include <string>
25
26#include "boost/date_time/posix_time/ptime.hpp"
27
28namespace opendal {
29
34enum class EntryMode : int {
35 FILE = 1,
36 DIR = 2,
37 UNKNOWN = 0,
38};
39
44class Metadata {
45 public:
47 std::uint64_t content_length;
48 std::optional<std::string> cache_control;
49 std::optional<std::string> content_disposition;
50 std::optional<std::string> content_md5;
51 std::optional<std::string> content_type;
52 std::optional<std::string> etag;
53 std::optional<boost::posix_time::ptime> last_modified;
54};
55
60class Entry {
61 public:
62 std::string path;
63};
64
65} // namespace opendal
The entry of a file or directory.
Definition data_structure.hpp:60
std::string path
Definition data_structure.hpp:62
The metadata of a file or directory.
Definition data_structure.hpp:44
std::optional< std::string > content_disposition
Definition data_structure.hpp:49
EntryMode type
Definition data_structure.hpp:46
std::optional< std::string > etag
Definition data_structure.hpp:52
std::optional< std::string > cache_control
Definition data_structure.hpp:48
std::optional< std::string > content_type
Definition data_structure.hpp:51
std::uint64_t content_length
Definition data_structure.hpp:47
std::optional< std::string > content_md5
Definition data_structure.hpp:50
std::optional< boost::posix_time::ptime > last_modified
Definition data_structure.hpp:53
Definition data_structure.hpp:28
EntryMode
The mode of the entry.
Definition data_structure.hpp:34