breaking changes in type system
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#include "../String/StringBuilder.h"
|
||||
#include "io_includes.h"
|
||||
|
||||
ktid_define(File);
|
||||
kt_define(File, (freeMembers_t)file_close, NULL)
|
||||
|
||||
bool file_exists(const char* path){
|
||||
if(path[0]=='.'){
|
||||
@@ -61,10 +61,10 @@ Maybe file_close(File* file){
|
||||
return MaybeNull;
|
||||
}
|
||||
|
||||
#define ioWriteCheck()\
|
||||
if(rezult==EOF)\
|
||||
safethrow(ERR_IO_EOF,;);\
|
||||
if(rezult!=0)\
|
||||
#define ioWriteCheck() \
|
||||
if(rezult==EOF) \
|
||||
safethrow(ERR_IO_EOF,;); \
|
||||
if(rezult!=0) \
|
||||
safethrow(ERR_IO,;);
|
||||
|
||||
Maybe file_writeChar(File* file, char byte){
|
||||
|
||||
@@ -9,14 +9,14 @@ extern "C" {
|
||||
#include "../String/string.h"
|
||||
|
||||
typedef FILE File;
|
||||
ktid_declare(File);
|
||||
kt_declare(File);
|
||||
|
||||
bool file_exists(const char* path);
|
||||
|
||||
///@return Maybe<void>
|
||||
Maybe file_delete(const char* path, bool recursive);
|
||||
|
||||
PACK_ENUM(FileOpenMode,
|
||||
PACKED_ENUM(FileOpenMode,
|
||||
// open a file for reading
|
||||
FileOpenMode_Read=1,
|
||||
// (re)create a file for writing
|
||||
|
||||
Reference in New Issue
Block a user