libstorage-ng
Toggle main menu visibility
Loading...
Searching...
No Matches
Filesystem.h
1
/*
2
* Copyright (c) [2014-2015] Novell, Inc.
3
* Copyright (c) [2016-2017] SUSE LLC
4
*
5
* All Rights Reserved.
6
*
7
* This program is free software; you can redistribute it and/or modify it
8
* under the terms of version 2 of the GNU General Public License as published
9
* by the Free Software Foundation.
10
*
11
* This program is distributed in the hope that it will be useful, but WITHOUT
12
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14
* more details.
15
*
16
* You should have received a copy of the GNU General Public License along
17
* with this program; if not, contact Novell, Inc.
18
*
19
* To contact Novell about this file by physical or electronic mail, you may
20
* find current contact information at www.novell.com.
21
*/
22
23
24
#ifndef STORAGE_FILESYSTEM_H
25
#define STORAGE_FILESYSTEM_H
26
27
28
#include <vector>
29
30
#include "storage/Filesystems/Mountable.h"
31
32
33
namespace
storage
34
{
35
class
SpaceInfo
;
36
37
38
// abstract class
39
40
class
Filesystem :
public
Mountable
41
{
42
public
:
43
47
static
std::vector<Filesystem*>
get_all
(
Devicegraph
* devicegraph);
48
52
static
std::vector<const Filesystem*>
get_all
(
const
Devicegraph
* devicegraph);
53
59
FsType
get_type
()
const
;
60
64
bool
has_space_info
()
const
;
65
78
SpaceInfo
detect_space_info
()
const
;
79
83
void
set_space_info
(
const
SpaceInfo
& space_info);
84
85
public
:
86
87
class
Impl;
88
89
Impl& get_impl();
90
const
Impl& get_impl()
const
;
91
92
protected
:
93
94
Filesystem(Impl* impl);
95
ST_NO_SWIG Filesystem(std::unique_ptr<Device::Impl>&& impl);
96
97
};
98
99
105
bool
is_filesystem
(
const
Device
* device);
106
113
Filesystem
*
to_filesystem
(
Device
* device);
114
118
const
Filesystem
*
to_filesystem
(
const
Device
* device);
119
120
}
121
122
#endif
storage::Device
An abstract base class for storage devices.
Definition
Device.h:82
storage::Devicegraph
The main container of the libstorage-ng.
Definition
Devicegraph.h:170
storage::Filesystem
Definition
Filesystem.h:41
storage::Filesystem::has_space_info
bool has_space_info() const
Query whether the SpaceInfo was already detected or set.
storage::Filesystem::detect_space_info
SpaceInfo detect_space_info() const
Detect the SpaceInfo.
storage::Filesystem::get_type
FsType get_type() const
Get the filesystem type.
storage::Filesystem::get_all
static std::vector< Filesystem * > get_all(Devicegraph *devicegraph)
Get all Filesystems.
storage::Filesystem::get_all
static std::vector< const Filesystem * > get_all(const Devicegraph *devicegraph)
Get all Filesystems.
storage::Filesystem::set_space_info
void set_space_info(const SpaceInfo &space_info)
Set the SpaceInfo.
storage::SpaceInfo
Definition
FreeInfo.h:331
storage
The storage namespace.
Definition
Actiongraph.h:40
storage::to_filesystem
Filesystem * to_filesystem(Device *device)
Converts pointer to Device to pointer to Filesystem.
storage::is_filesystem
bool is_filesystem(const Device *device)
Checks whether device points to a Filesystem.
storage
Filesystems
Filesystem.h
Generated by
1.17.0