]> git.saurik.com Git - apple/security.git/blob - OSX/utilities/fileIo.h
Security-59306.120.7.tar.gz
[apple/security.git] / OSX / utilities / fileIo.h
1 /*
2 * Copyright (c) 2005-2007,2010,2012 Apple Inc. All Rights Reserved.
3 */
4
5 #include <sys/types.h>
6
7 /*
8 * Read entire file.
9 */
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13
14 int readFileSizet(
15 const char *fileName,
16 unsigned char **bytes, // mallocd and returned
17 size_t *numBytes); // returned
18
19 int writeFile(
20 const char *fileName,
21 const unsigned char *bytes,
22 unsigned numBytes);
23
24 int writeFileSizet(
25 const char *fileName,
26 const unsigned char *bytes,
27 size_t numBytes);
28
29 #ifdef __cplusplus
30 }
31 #endif