]> git.saurik.com Git - apple/security.git/blob - OSX/utilities/src/fileIo.h
Security-57336.10.29.tar.gz
[apple/security.git] / OSX / utilities / src / 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 readFile(
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 size_t numBytes);
23
24 #ifdef __cplusplus
25 }
26 #endif