2020-06-21 14:45:14 -04:00
|
|
|
/*
|
|
|
|
|
ISC License
|
|
|
|
|
|
2021-03-28 12:34:30 -04:00
|
|
|
Copyright (c) 2022, Antonio SJ Musumeci <trapexit@spawn.link>
|
2020-06-21 14:45:14 -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.
|
|
|
|
|
*/
|
|
|
|
|
|
2021-03-28 12:34:30 -04:00
|
|
|
#include "fuse_create_func.hpp"
|
|
|
|
|
#include "fuse_create_func_factory.hpp"
|
2020-06-21 14:45:14 -04:00
|
|
|
|
2021-03-28 12:34:30 -04:00
|
|
|
#include "toml.hpp"
|
2020-06-21 14:45:14 -04:00
|
|
|
|
2021-03-28 12:34:30 -04:00
|
|
|
|
|
|
|
|
FUSE::CREATE::Func::Func(const toml::value &toml_)
|
|
|
|
|
{
|
|
|
|
|
_create = FuncFactory(toml_);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
FUSE::CREATE::Func::operator()(const char *fusepath_,
|
|
|
|
|
const mode_t mode_,
|
|
|
|
|
const mode_t umask_,
|
|
|
|
|
fuse_file_info_t *ffi_)
|
|
|
|
|
{
|
|
|
|
|
return (*_create)(fusepath_,mode_,umask_,ffi_);
|
|
|
|
|
}
|