Started writing the management program.
This commit is contained in:
32
src/backing.h
Normal file
32
src/backing.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/// @brief Returns the directory path where the backing disks are stored.
|
||||
/// @return The directory path where the backing disks are stored. The caller is responsible for freeing the returned string. This function can return NULL.
|
||||
char* get_backings_path(void);
|
||||
|
||||
/// @brief Checks if the specified backing disk name is valid.
|
||||
/// @param name The backing disk name to check.
|
||||
/// @return true if the backing disk name is valid, otherwise false.
|
||||
bool is_valid_backing_name(const char* name);
|
||||
|
||||
/// @brief Returns the path to the specified backing disk.
|
||||
/// @param backing The valid backing disk name.
|
||||
/// @return The path to the specified backing disk. The caller is responsible for freeing the returned string. This function can return NULL.
|
||||
char* get_backing_path(const char* backing);
|
||||
|
||||
/// @brief Checks if the specified backing disk exists.
|
||||
/// @param backing The valid backing disk name.
|
||||
/// @return true if the backing disk exists, otherwise false.
|
||||
bool backing_exists(const char* backing);
|
||||
|
||||
/// @brief Lists the backing disks.
|
||||
/// @return The list of backing disks. The caller is responsible for freeing the returned array and strings. This function can return NULL.
|
||||
char** list_backings(void);
|
||||
|
||||
/// @brief Creates a new backing disk.
|
||||
/// @param backing_disk The disk to use as the backing disk. Warning: the disk must be part of the backing disks.
|
||||
/// @return true if the backing disk was created, otherwise false.
|
||||
bool create_backing(const char* backing_disk);
|
Reference in New Issue
Block a user