Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Directory.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* Directory.h (C) 2000-2025 */
9/* */
10/* Directory management. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_DIRECTORY_H
13#define ARCANE_CORE_DIRECTORY_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/String.h"
18
19#include "arcane/core/IDirectory.h"
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24namespace Arcane
25{
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
30/*!
31 * \ingroup IO
32 * \brief Class managing a directory.
33 */
34class ARCANE_CORE_EXPORT Directory
35: public IDirectory
36{
37 public:
38
39 Directory() = default;
40 explicit Directory(const String& path);
41 Directory(const Directory& directory);
42 Directory(const IDirectory& directory, const String& sub_path);
43 Directory(const IDirectory& directory);
44
45 public:
46
47 Directory& operator=(const IDirectory& from);
48 Directory& operator=(const Directory& from);
49
50 public:
51
52 bool createDirectory() const override;
53 String path() const override;
54 String file(const String& file_name) const override;
55
56 private:
57
58 String m_directory_path;
59};
60
61/*---------------------------------------------------------------------------*/
62/*---------------------------------------------------------------------------*/
63
64} // namespace Arcane
65
66/*---------------------------------------------------------------------------*/
67/*---------------------------------------------------------------------------*/
68
69#endif
String file(const String &file_name) const override
Returns the full path of the file file_name in the directory.
Definition Directory.cc:120
bool createDirectory() const override
Creates the directory.
Definition Directory.cc:102
String path() const override
Returns the path of the directory.
Definition Directory.cc:111
Interface of a class managing a directory.
Definition IDirectory.h:32
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --