You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

22 lines
345 B

  1. #pragma once
  2. #include "file.h"
  3. namespace cppfs
  4. {
  5. /* file */
  6. const file& file::remove() const
  7. {
  8. using namespace std::string_literals;
  9. auto& s = _path.str();
  10. if (unlink(s.c_str()))
  11. throw cppcore::error_exception("Unable to remove file: "s + _path.str(), errno);
  12. return *this;
  13. }
  14. }