MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ can_write()

bool MayaFlux::IO::TextFileWriter::can_write ( const std::string &  filepath) const
overridevirtual

Check if this writer can handle the given file path.

Implements MayaFlux::IO::FileWriter.

Definition at line 14 of file TextFileWriter.cpp.

15{
16 std::filesystem::path path(resolve_write_path(filepath));
17
18 auto parent = path.parent_path();
19 if (parent.empty()) {
20 parent = std::filesystem::current_path();
21 }
22
23 return std::filesystem::exists(parent) && !std::filesystem::is_directory(path);
24}
std::vector< uint32_t > parent
std::string resolve_write_path(const std::string &filepath, std::string_view default_directory=Config::OUT_DIR)
Resolve a writable path against the configured output directory.

References parent, and MayaFlux::IO::resolve_write_path().

+ Here is the call graph for this function: