forked from mirkokiefer/LivelyC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LCUtils.h
34 lines (27 loc) · 1.04 KB
/
LCUtils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef LivelyStore_LCUtils_h
#define LivelyStore_LCUtils_h
#include <ftw.h>
#include <unistd.h>
#include "url_open.h"
#include "LCCore.h"
#include "LCString.h"
#include "LCArray.h"
#include "LCData.h"
void LCPrintf(LCObjectRef object);
char hexDigitToASCIChar(char hexDigit);
char asciCharToHexDigit(char hexDigit);
void byteToHexDigits(LCByte input, char* buffer);
LCByte hexDigitsToByte(char *hexDigits);
void createHexString(LCByte data[], size_t length, char buffer[]);
LCDataRef createDataFromHexString(LCStringRef hexString);
LCArrayRef createPathArray(LCStringRef path);
void writeToFile(LCByte data[], size_t length, char *filePath);
size_t fileLength(FILE *fd);
void readFromFile(FILE *fd, LCByte buffer[], size_t length);
int makeDirectory(char *path);
int deleteDirectory(char *path);
LCStringRef getHomeFolder(void);
int pipeFiles(FILE *read, FILE *write, size_t bufferLength);
int pipeFileToFunction(void *cookie, FILE *read, writeStreamFun writeFun, size_t bufferLength);
int pipeURLToFile(URL_FILE *read, FILE *write, size_t bufferLength);
#endif