ApraLinuxUtils 1.0.0
C++ utility library for embedded Linux systems
 
Loading...
Searching...
No Matches
StorageType.cpp
Go to the documentation of this file.
1/*
2 * StorageType.cpp
3 *
4 * Copyright (c) 2024 Apra Labs
5 *
6 * This file is part of ApraUtils.
7 *
8 * Licensed under the MIT License.
9 * See LICENSE file in the project root for full license information.
10 */
11
13
14namespace apra
15{
16
18{
19 switch (type)
20 {
21 case FAT32:
22 return "vfat";
23 case NTFS:
24 return "ntfs";
25 case EXT4:
26 return "ext4";
27 case UNSUPPORTED:
28 return "";
29 default:
30 return "";
31 }
32}
33
35{
36 if (typeStr == getString(NTFS))
37 {
38 return NTFS;
39 }
40 else if (typeStr == getString(EXT4))
41 {
42 return EXT4;
43 }
44 else if (typeStr == getString(FAT32))
45 {
46 return FAT32;
47 }
48 else
49 {
50 return UNSUPPORTED;
51 }
52}
53
54} /* namespace apra */
static STORAGE_TYPE getEnum(std::string typeStr)
static std::string getString(STORAGE_TYPE type)
STORAGE_TYPE
Definition StorageType.h:19
@ UNSUPPORTED
Definition StorageType.h:20
@ FAT32
Definition StorageType.h:20