2020-06-22 13:03:48 -04:00
|
|
|
/*
|
|
|
|
|
ISC License
|
|
|
|
|
|
2026-02-23 13:22:21 -06:00
|
|
|
Copyright (c) 2026, Antonio SJ Musumeci <trapexit@spawn.link>
|
2020-06-22 13:03:48 -04:00
|
|
|
|
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
|
|
|
purpose with or without fee is hereby granted, provided that the above
|
|
|
|
|
copyright notice and this permission notice appear in all copies.
|
|
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
|
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
|
|
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
|
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
|
|
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "config_inodecalc.hpp"
|
|
|
|
|
#include "fs_inode.hpp"
|
|
|
|
|
|
2020-12-19 15:06:08 -05:00
|
|
|
|
2020-06-22 13:03:48 -04:00
|
|
|
InodeCalc::InodeCalc(const std::string &s_)
|
|
|
|
|
{
|
|
|
|
|
fs::inode::set_algo(s_);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::string
|
|
|
|
|
InodeCalc::to_string(void) const
|
|
|
|
|
{
|
|
|
|
|
return fs::inode::get_algo();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
2025-08-21 23:42:58 -04:00
|
|
|
InodeCalc::from_string(const std::string_view s_)
|
2020-06-22 13:03:48 -04:00
|
|
|
{
|
2025-09-17 23:51:16 -04:00
|
|
|
return fs::inode::set_algo(std::string{s_});
|
2020-06-22 13:03:48 -04:00
|
|
|
}
|