├── opam ├── findlib ├── descr └── opam ├── docs ├── html.stamp ├── type_Plist.html ├── index_classes.html ├── index_class_types.html ├── index_exceptions.html ├── index_extensions.html ├── index_methods.html ├── index_module_types.html ├── index_attributes.html ├── index_types.html ├── index_modules.html ├── index.html ├── index_values.html ├── Plist.html └── style.css ├── .merlin ├── .gitignore ├── configure ├── examples └── e1.ml ├── Makefile ├── README.md ├── lib ├── plist.ml └── plist_ml_stubs.c ├── _oasis └── setup.ml /opam/findlib: -------------------------------------------------------------------------------- 1 | plist 2 | -------------------------------------------------------------------------------- /docs/html.stamp: -------------------------------------------------------------------------------- 1 | 1a2c4ca69fbe973d95a7b929b59a7aff -------------------------------------------------------------------------------- /opam/descr: -------------------------------------------------------------------------------- 1 | Native OCaml Plist manipulation 2 | 3 | Plist 4 | -------------------------------------------------------------------------------- /.merlin: -------------------------------------------------------------------------------- 1 | PKG lambdasoup yojson 2 | PKG alcotest osx-plutil 3 | 4 | PKG plist oasis 5 | 6 | S . 7 | B _build/** 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.annot 2 | *.cmo 3 | *.cma 4 | *.cmi 5 | *.a 6 | *.o 7 | *.cmx 8 | *.cmxs 9 | *.cmxa 10 | 11 | # ocamlbuild working directory 12 | _build/ 13 | 14 | # ocamlbuild targets 15 | *.byte 16 | *.native 17 | 18 | # alcotest outputs 19 | _tests/ 20 | 21 | # oasis generated files 22 | setup.data 23 | setup.log 24 | plist.0.1 25 | 26 | # editor backups 27 | *~ 28 | test-idea.plist 29 | api.docdir -------------------------------------------------------------------------------- /configure: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # OASIS_START 4 | # DO NOT EDIT (digest: dc86c2ad450f91ca10c931b6045d0499) 5 | set -e 6 | 7 | FST=true 8 | for i in "$@"; do 9 | if $FST; then 10 | set -- 11 | FST=false 12 | fi 13 | 14 | case $i in 15 | --*=*) 16 | ARG=${i%%=*} 17 | VAL=${i##*=} 18 | set -- "$@" "$ARG" "$VAL" 19 | ;; 20 | *) 21 | set -- "$@" "$i" 22 | ;; 23 | esac 24 | done 25 | 26 | ocaml setup.ml -configure "$@" 27 | # OASIS_STOP 28 | -------------------------------------------------------------------------------- /docs/type_Plist.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |sig end
--------------------------------------------------------------------------------
/docs/index_classes.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | P | |
| plist [Plist] | 19 |
P | |
| Plist | 19 |
20 | OCaml bindings to native Objective-C handling of plists; works on
21 | Linux and OS X
22 |
23 | |
| Plist |
23 | OCaml bindings to native Objective-C handling of plists; works on
24 | Linux and OS X
25 |
26 | |
F | |
| from_file [Plist] | 19 |
20 | Raises Invalid_argument if file does not exist
21 |
22 | |
| from_string [Plist] | 24 |
25 | Create a plist from a JSON formatted string, raises
26 | Invalid_argument if input string isn't in a Plist readable
27 | format
28 |
29 | |
| from_yojson [Plist] | 31 |
32 | Simple helpers
33 |
34 | |
T | |
| to_bytes [Plist] | 37 |
38 | Returns the plist as raw binary bytes, raises Invalid_argument if
39 | plist can't be turned into raw bytes
40 |
41 | |
| to_file [Plist] | 43 |
44 | Writing a plist to file, second argument is whether to write as
45 | binary; raises Invalid_argument if trying to convert plist to
46 | binary fails, raises Failure if writing to a file location
47 | fails.
48 |
49 | |
| to_string [Plist] | 51 |
52 | Convert a Plist into a pretty formated JSON string, raises
53 | Invalid_argument when plist can't be turned into a string
54 |
55 | |
| to_yojson [Plist] | 57 |
module Plist:sig..end
type plist
26 |
27 |
28 | val from_string : string -> plistval to_string : plist -> stringval to_file : string -> bool -> plist -> unitval from_file : string -> plistval to_bytes : plist -> bytesval from_yojson : Yojson.Basic.json -> plistval to_yojson : plist -> Yojson.Basic.json
--------------------------------------------------------------------------------
/docs/style.css:
--------------------------------------------------------------------------------
1 | /* A style for ocamldoc. Daniel C. Buenzli */
2 |
3 | /* Reset a few things. */
4 | html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,
5 | a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,
6 | small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,
7 | form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td
8 | { margin: 0; padding: 0; border: 0 none; outline: 0; font-size: 100%;
9 | font-weight: inherit; font-style:inherit; font-family:inherit;
10 | line-height: inherit; vertical-align: baseline; text-align:inherit;
11 | color:inherit; background: transparent; }
12 |
13 | table { border-collapse: collapse; border-spacing: 0; }
14 |
15 | /* Basic page layout */
16 |
17 | body { font: normal 10pt/1.375em helvetica, arial, sans-serif; text-align:left;
18 | margin: 1.375em 10%; min-width: 40ex; max-width: 72ex;
19 | color: black; background: white /* url(line-height-22.gif) */; }
20 |
21 | b { font-weight: bold }
22 | em { font-style: italic }
23 |
24 | tt, code, pre { font-family: WorkAroundWebKitAndMozilla, monospace;
25 | font-size: 1em; }
26 | pre code { font-size : inherit; }
27 | .codepre { margin-bottom:1.375em /* after code example we introduce space. */ }
28 |
29 | pre { padding: 5px; }
30 | code.code, pre.codepre, pre.verbatim { background-color: #f7f7f7; border-radius: 3px; }
31 | code.code { font-size: 95%; padding: 0.1em 0.2em; }
32 | pre.codepre code.code { padding: 0; }
33 |
34 |
35 | .superscript,.subscript
36 | { font-size : 0.813em; line-height:0; margin-left:0.4ex;}
37 | .superscript { vertical-align: super; }
38 | .subscript { vertical-align: sub; }
39 |
40 | /* ocamldoc markup workaround hacks */
41 |
42 |
43 |
44 | hr, hr + br, div + br, center + br, span + br, ul + br, ol + br, pre + br
45 | { display: none } /* annoying */
46 |
47 | div.info + br { display:block}
48 |
49 | .codepre br + br { display: none }
50 | h1 + pre { margin-bottom:1.375em} /* Toplevel module description */
51 |
52 | /* Sections and document divisions */
53 |
54 | /* .navbar { margin-bottom: -1.375em } */
55 | h1 { font-weight: bold; font-size: 1.5em; /* margin-top:1.833em; */
56 | margin-top:0.917em; padding-top:0.875em;
57 | border-top-style:solid; border-width:1px; border-color:#AAA; }
58 | h2 { font-weight: bold; font-size: 1.313em; margin-top: 1.048em }
59 | h3 { font-weight: bold; font-size: 1.125em; margin-top: 1.222em }
60 | h3 { font-weight: bold; font-size: 1em; margin-top: 1.375em}
61 | h4 { font-style: italic; }
62 |
63 | /* Used by OCaml's own library documentation. */
64 | h6 { font-weight: bold; font-size: 1.125em; margin-top: 1.222em }
65 | .h7 { font-weight: bold; font-size: 1em; margin-top: 1.375em }
66 |
67 | p { margin-top: 1.375em }
68 | pre { margin-top: 1.375em }
69 | .info { margin: 0.458em 0em -0.458em 2em;}/* Description of types values etc. */
70 | td .info { margin:0; padding:0; margin-left: 2em;} /* Description in indexes */
71 |
72 | ul, ol { margin-top:0.688em; padding-bottom:0.687em;
73 | list-style-position:outside}
74 | ul + p, ol + p { margin-top: 0em }
75 | ul { list-style-type: square }
76 |
77 |
78 | /* h2 + ul, h3 + ul, p + ul { } */
79 | ul > li { margin-left: 1.375em; }
80 | ol > li { margin-left: 1.7em; }
81 | /* Links */
82 |
83 | a, a:* { text-decoration: underline }
84 | *:target {background-color: #FFFF99;} /* anchor highlight */
85 |
86 | /* Code */
87 |
88 | .keyword { font-weight: bold; }
89 | .comment { color : red }
90 | .constructor { color : green }
91 | .string { color : #957; }
92 | .warning { color : red ; font-weight : bold }
93 |
94 | /* Functors */
95 |
96 | .paramstable { border-style : hidden ; padding-bottom:1.375em}
97 | .paramstable code { margin-left: 1ex; margin-right: 1ex }
98 | .sig_block {margin-left: 1em}
99 |
100 | /* Images */
101 |
102 | img { margin-top: 1.375em; display:block }
103 | li img { margin-top: 0em; }
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/lib/plist_ml_stubs.c:
--------------------------------------------------------------------------------
1 | // -*- objc -*-
2 |
3 | #define CAML_NAME_SPACE
4 |
5 | #import