]> git.saurik.com Git - apple/security.git/blobdiff - Security/utilities/src/fileIo.h
Security-57031.1.35.tar.gz
[apple/security.git] / Security / utilities / src / fileIo.h
diff --git a/Security/utilities/src/fileIo.h b/Security/utilities/src/fileIo.h
new file mode 100644 (file)
index 0000000..d12413f
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2005-2007,2010,2012 Apple Inc. All Rights Reserved.
+ */
+
+#include <sys/types.h>
+
+/*
+ * Read entire file.
+ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int readFile(
+       const char                      *fileName,
+       unsigned char           **bytes,                // mallocd and returned
+       size_t              *numBytes);         // returned
+
+int writeFile(
+       const char                      *fileName,
+       const unsigned char     *bytes,
+       size_t              numBytes);
+
+#ifdef __cplusplus
+}
+#endif