IO

File, logging and other I/O operation

  • File — Simple file reading utilities
  • Log — Leveled logger with colored console output
#include <uhcio.uhh>
namespace Log {
  enum Level {
      UHC_LOG_TRACE,
      UHC_LOG_DEBUG,
      UHC_LOG_INFO,
      UHC_LOG_WARN,
      UHC_LOG_ERROR,
  };
  U0 trace(const I8* fmt, ...)
  U0 debug(const I8* fmt, ...)
  U0 info (const I8* fmt, ...)
  U0 warn (const I8* fmt, ...)
  U0 error(const I8* fmt, ...)
  U0 msg  (const I8* fmt, ...)
}

namespace File {
  self {
      FILE* handle
      I64 size
  }
  File open(const I8* filePath)
  U0 close(File file)
  I8* read(File file)
}