diff --git a/src/backing.h b/src/backing.h index 4d81b70..97fcf98 100644 --- a/src/backing.h +++ b/src/backing.h @@ -26,6 +26,10 @@ bool backing_exists(const char* backing); /// @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 Finds the latest backing disk. +/// @return The latest backing disk. The caller is responsible for freeing the returned string. This function can return NULL. +char* find_latest_backing(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. diff --git a/src/entry.h b/src/entry.h index 2e6bfbd..c5666c4 100644 --- a/src/entry.h +++ b/src/entry.h @@ -25,3 +25,17 @@ bool entry_exists(const char* entry); /// @brief Lists the entries. /// @return The list of entries. The caller is responsible for freeing the returned array and strings. This function can return NULL. char** list_entries(void); + +/// @brief Finds the oldest entry (based on last access time). +/// @return The oldest entry. The caller is responsible for freeing the returned string. This function can return NULL. +char* find_oldest_entry(void); + +/// @brief Creates a new entry. +/// @param entry The valid entry name. +/// @return true if the entry was created, otherwise false. +bool create_entry(const char* entry); + +/// @brief Deletes the specified entry. +/// @param entry The valid entry name. +/// @return true if the entry was deleted, otherwise false. +bool delete_entry(const char* entry); diff --git a/src/sandbox.c b/src/sandbox.c index 9b56cf2..c82bea0 100644 --- a/src/sandbox.c +++ b/src/sandbox.c @@ -12,5 +12,4 @@ #include int main(int argc, char* argv[]) { - char** backings = list_backings(); } \ No newline at end of file