Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
IDirectory.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/* IDirectory.h (C) 2000-2025 */
9/* */
10/* Directory management. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IDIRECTORY_H
13#define ARCANE_CORE_IDIRECTORY_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28/*!
29 * \brief Interface of a class managing a directory.
30 */
31class ARCANE_CORE_EXPORT IDirectory
32{
33 public:
34
35 virtual ~IDirectory() = default; //!< Frees the resources
36
37 public:
38
39 /*!
40 * \brief Creates the directory.
41 * \retval true in case of failure,
42 * \retval false in case of success or if the directory already exists.
43 */
44 virtual bool createDirectory() const = 0;
45
46 //! Returns the path of the directory
47 virtual String path() const = 0;
48
49 //! Returns the full path of the file \a file_name in the directory
50 virtual String file(const String& file_name) const = 0;
51};
52
53/*---------------------------------------------------------------------------*/
54/*---------------------------------------------------------------------------*/
55
56} // namespace Arcane
57
58/*---------------------------------------------------------------------------*/
59/*---------------------------------------------------------------------------*/
60
61#endif
Arcane configuration file.
Interface of a class managing a directory.
Definition IDirectory.h:32
virtual bool createDirectory() const =0
Creates the directory.
virtual String file(const String &file_name) const =0
Returns the full path of the file file_name in the directory.
virtual ~IDirectory()=default
Frees the resources.
virtual String path() const =0
Returns the path of the directory.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --