MayaFlux 0.2.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(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}