package file_path

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file test_stable.ml

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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
open! Core

module Part = struct
  module V1 = struct
    type t = File_path.Stable.Part.V1.t
    [@@deriving bin_io, compare, equal, hash, sexp, sexp_grammar, stable_witness]

    type comparator_witness = File_path.Stable.Part.V1.comparator_witness

    let comparator = File_path.Stable.Part.V1.comparator
    let hashable = File_path.Stable.Part.V1.hashable

    let%expect_test _ =
      Helpers.test_stable_version
        [%here]
        (module File_path.Stable.Part.V1)
        Examples.Part.for_conversion;
      [%expect
        {|
        (bin_shape_digest 2c658a7c91fc0a7cf9af9aae6b799d09)
        ((sexp .) (bin_io "\001."))
        ((sexp ..) (bin_io "\002.."))
        ((sexp filename.txt) (bin_io "\012filename.txt"))
        ((sexp bin) (bin_io "\003bin"))
        ((sexp .hidden) (bin_io "\007.hidden"))
        ((sexp "This is a sentence; it has punctuation, capitalization, and spaces!")
         (bin_io
          "CThis is a sentence; it has punctuation, capitalization, and spaces!"))
        ((sexp "\001\255") (bin_io "\002\001\255")) |}]
    ;;

    module Map = File_path.Stable.Part.V1.Map
    module Set = File_path.Stable.Part.V1.Set
    module Table = File_path.Stable.Part.V1.Table
    module Hash_set = File_path.Stable.Part.V1.Hash_set

    let%expect_test _ =
      Helpers.test_stable_containers
        [%here]
        (module File_path.Stable.Part.V1)
        Examples.Part.for_conversion;
      [%expect
        {|
        ((name Map) (bin_shape_digest 727af34db3b3d8fe9ec75bd4bde3e79f))
        ((name Set) (bin_shape_digest c3978702a055dec09b2070750427b070))
        ((name Table) (bin_shape_digest cd88244b145d18bce45aa35a507adebe))
        ((name Hash_set) (bin_shape_digest 08de2ea8fcec183ba72fc76acd65937f))
        (Set
         ("\001\255"
          .
          ..
          .hidden
          "This is a sentence; it has punctuation, capitalization, and spaces!"
          bin
          filename.txt))
        (Map
         (("\001\255" 6)
          (. 0)
          (.. 1)
          (.hidden 4)
          ("This is a sentence; it has punctuation, capitalization, and spaces!" 5)
          (bin 3)
          (filename.txt 2)))
        (Hash_set
         ("\001\255"
          .
          ..
          .hidden
          "This is a sentence; it has punctuation, capitalization, and spaces!"
          bin
          filename.txt))
        (Table
         (("\001\255" 6)
          (. 0)
          (.. 1)
          (.hidden 4)
          ("This is a sentence; it has punctuation, capitalization, and spaces!" 5)
          (bin 3)
          (filename.txt 2))) |}]
    ;;
  end
end

module Relative = struct
  module V1 = struct
    type t = File_path.Stable.Relative.V1.t
    [@@deriving bin_io, compare, equal, hash, sexp, sexp_grammar, stable_witness]

    type comparator_witness = File_path.Stable.Relative.V1.comparator_witness

    let comparator = File_path.Stable.Relative.V1.comparator
    let hashable = File_path.Stable.Relative.V1.hashable

    let%expect_test _ =
      Helpers.test_stable_version
        [%here]
        (module File_path.Stable.Relative.V1)
        Examples.Relative.for_conversion;
      [%expect
        {|
        (bin_shape_digest 7c63400e8c30043c29264293375a91dc)
        ((sexp .) (bin_io "\001."))
        ((sexp ..) (bin_io "\002.."))
        ((sexp filename.txt) (bin_io "\012filename.txt"))
        ((sexp bin) (bin_io "\003bin"))
        ((sexp .hidden) (bin_io "\007.hidden"))
        ((sexp "This is a sentence; it has punctuation, capitalization, and spaces!")
         (bin_io
          "CThis is a sentence; it has punctuation, capitalization, and spaces!"))
        ((sexp "\001\255") (bin_io "\002\001\255"))
        ((sexp ./.) (bin_io "\003./."))
        ((sexp ../..) (bin_io "\005../.."))
        ((sexp ././.) (bin_io "\005././."))
        ((sexp bin/exe) (bin_io "\007bin/exe"))
        ((sexp bin/exe/file) (bin_io "\012bin/exe/file")) |}]
    ;;

    module Map = File_path.Stable.Relative.V1.Map
    module Set = File_path.Stable.Relative.V1.Set
    module Table = File_path.Stable.Relative.V1.Table
    module Hash_set = File_path.Stable.Relative.V1.Hash_set

    let%expect_test _ =
      Helpers.test_stable_containers
        [%here]
        (module File_path.Stable.Relative.V1)
        Examples.Relative.for_conversion;
      [%expect
        {|
        ((name Map) (bin_shape_digest 0a9d2f751b6585546ea48d815e859877))
        ((name Set) (bin_shape_digest 62c6b347cb5af74a577a7c63c152df38))
        ((name Table) (bin_shape_digest 5342018d47459f582dcecacfc3e6633e))
        ((name Hash_set) (bin_shape_digest def0d38d8fd5634c86e18110052bf3a8))
        (Set
         ("\001\255"
          .
          ./.
          ././.
          ..
          ../..
          .hidden
          "This is a sentence; it has punctuation, capitalization, and spaces!"
          bin
          bin/exe
          bin/exe/file
          filename.txt))
        (Map
         (("\001\255" 6)
          (. 0)
          (./. 7)
          (././. 9)
          (.. 1)
          (../.. 8)
          (.hidden 4)
          ("This is a sentence; it has punctuation, capitalization, and spaces!" 5)
          (bin 3)
          (bin/exe 10)
          (bin/exe/file 11)
          (filename.txt 2)))
        (Hash_set
         ("\001\255"
          .
          ./.
          ././.
          ..
          ../..
          .hidden
          "This is a sentence; it has punctuation, capitalization, and spaces!"
          bin
          bin/exe
          bin/exe/file
          filename.txt))
        (Table
         (("\001\255" 6)
          (. 0)
          (./. 7)
          (././. 9)
          (.. 1)
          (../.. 8)
          (.hidden 4)
          ("This is a sentence; it has punctuation, capitalization, and spaces!" 5)
          (bin 3)
          (bin/exe 10)
          (bin/exe/file 11)
          (filename.txt 2))) |}]
    ;;
  end
end

module Absolute = struct
  module V1 = struct
    type t = File_path.Stable.Absolute.V1.t
    [@@deriving bin_io, compare, equal, hash, sexp, sexp_grammar, stable_witness]

    type comparator_witness = File_path.Stable.Absolute.V1.comparator_witness

    let comparator = File_path.Stable.Absolute.V1.comparator
    let hashable = File_path.Stable.Absolute.V1.hashable

    let%expect_test _ =
      Helpers.test_stable_version
        [%here]
        (module File_path.Stable.Absolute.V1)
        Examples.Absolute.for_conversion;
      [%expect
        {|
        (bin_shape_digest e6c3839cfda3952ba5bf2f32724946b1)
        ((sexp /) (bin_io "\001/"))
        ((sexp /.) (bin_io "\002/."))
        ((sexp /..) (bin_io "\003/.."))
        ((sexp /filename.txt) (bin_io "\r/filename.txt"))
        ((sexp /bin) (bin_io "\004/bin"))
        ((sexp /.hidden) (bin_io "\b/.hidden"))
        ((sexp "/This is a sentence; it has punctuation, capitalization, and spaces!")
         (bin_io
          "D/This is a sentence; it has punctuation, capitalization, and spaces!"))
        ((sexp "/\001\255") (bin_io "\003/\001\255"))
        ((sexp /./.) (bin_io "\004/./."))
        ((sexp /../..) (bin_io "\006/../.."))
        ((sexp /././.) (bin_io "\006/././."))
        ((sexp /bin/exe) (bin_io "\b/bin/exe"))
        ((sexp /bin/exe/file) (bin_io "\r/bin/exe/file")) |}]
    ;;

    module Map = File_path.Stable.Absolute.V1.Map
    module Set = File_path.Stable.Absolute.V1.Set
    module Table = File_path.Stable.Absolute.V1.Table
    module Hash_set = File_path.Stable.Absolute.V1.Hash_set

    let%expect_test _ =
      Helpers.test_stable_containers
        [%here]
        (module File_path.Stable.Absolute.V1)
        Examples.Absolute.for_conversion;
      [%expect
        {|
        ((name Map) (bin_shape_digest e882f18d261f167f0b63dd0eda7789f2))
        ((name Set) (bin_shape_digest e15617a37fcb709b1970976b5bef6975))
        ((name Table) (bin_shape_digest d4f5b41e00a6adf84b206c072119e460))
        ((name Hash_set) (bin_shape_digest bb4918ef1705f54acc1cc9038c2c89c6))
        (Set
         (/
          "/\001\255"
          /.
          /./.
          /././.
          /..
          /../..
          /.hidden
          "/This is a sentence; it has punctuation, capitalization, and spaces!"
          /bin
          /bin/exe
          /bin/exe/file
          /filename.txt))
        (Map
         ((/ 0)
          ("/\001\255" 7)
          (/. 1)
          (/./. 8)
          (/././. 10)
          (/.. 2)
          (/../.. 9)
          (/.hidden 5)
          ("/This is a sentence; it has punctuation, capitalization, and spaces!" 6)
          (/bin 4)
          (/bin/exe 11)
          (/bin/exe/file 12)
          (/filename.txt 3)))
        (Hash_set
         (/
          "/\001\255"
          /.
          /./.
          /././.
          /..
          /../..
          /.hidden
          "/This is a sentence; it has punctuation, capitalization, and spaces!"
          /bin
          /bin/exe
          /bin/exe/file
          /filename.txt))
        (Table
         ((/ 0)
          ("/\001\255" 7)
          (/. 1)
          (/./. 8)
          (/././. 10)
          (/.. 2)
          (/../.. 9)
          (/.hidden 5)
          ("/This is a sentence; it has punctuation, capitalization, and spaces!" 6)
          (/bin 4)
          (/bin/exe 11)
          (/bin/exe/file 12)
          (/filename.txt 3))) |}]
    ;;
  end
end

module V1 = struct
  type t = File_path.Stable.V1.t
  [@@deriving bin_io, compare, equal, hash, sexp, sexp_grammar, stable_witness]

  type comparator_witness = File_path.Stable.V1.comparator_witness

  let comparator = File_path.Stable.V1.comparator
  let hashable = File_path.Stable.V1.hashable

  let%expect_test _ =
    Helpers.test_stable_version
      [%here]
      (module File_path.Stable.V1)
      Examples.for_conversion;
    [%expect
      {|
      (bin_shape_digest f88be70577dfbd75687bcc492e1863e8)
      ((sexp .) (bin_io "\001."))
      ((sexp ..) (bin_io "\002.."))
      ((sexp filename.txt) (bin_io "\012filename.txt"))
      ((sexp bin) (bin_io "\003bin"))
      ((sexp .hidden) (bin_io "\007.hidden"))
      ((sexp "This is a sentence; it has punctuation, capitalization, and spaces!")
       (bin_io
        "CThis is a sentence; it has punctuation, capitalization, and spaces!"))
      ((sexp "\001\255") (bin_io "\002\001\255"))
      ((sexp ./.) (bin_io "\003./."))
      ((sexp ../..) (bin_io "\005../.."))
      ((sexp ././.) (bin_io "\005././."))
      ((sexp bin/exe) (bin_io "\007bin/exe"))
      ((sexp bin/exe/file) (bin_io "\012bin/exe/file"))
      ((sexp /) (bin_io "\001/"))
      ((sexp /.) (bin_io "\002/."))
      ((sexp /..) (bin_io "\003/.."))
      ((sexp /filename.txt) (bin_io "\r/filename.txt"))
      ((sexp /bin) (bin_io "\004/bin"))
      ((sexp /.hidden) (bin_io "\b/.hidden"))
      ((sexp "/This is a sentence; it has punctuation, capitalization, and spaces!")
       (bin_io
        "D/This is a sentence; it has punctuation, capitalization, and spaces!"))
      ((sexp "/\001\255") (bin_io "\003/\001\255"))
      ((sexp /./.) (bin_io "\004/./."))
      ((sexp /../..) (bin_io "\006/../.."))
      ((sexp /././.) (bin_io "\006/././."))
      ((sexp /bin/exe) (bin_io "\b/bin/exe"))
      ((sexp /bin/exe/file) (bin_io "\r/bin/exe/file")) |}]
  ;;

  module Map = File_path.Stable.V1.Map
  module Set = File_path.Stable.V1.Set
  module Table = File_path.Stable.V1.Table
  module Hash_set = File_path.Stable.V1.Hash_set

  let%expect_test _ =
    Helpers.test_stable_containers
      [%here]
      (module File_path.Stable.V1)
      Examples.for_conversion;
    [%expect
      {|
      ((name Map) (bin_shape_digest 2cdefe9add8dc26bf0a5d82cbb847d1c))
      ((name Set) (bin_shape_digest 1caa2335199b24a3dd64dfa6442c10d7))
      ((name Table) (bin_shape_digest 7e47d7a49368600574627a357b2139c8))
      ((name Hash_set) (bin_shape_digest 12d4ae0b344732bde6f68e7363ed5c52))
      (Set
       (/
        "/\001\255"
        /.
        /./.
        /././.
        /..
        /../..
        /.hidden
        "/This is a sentence; it has punctuation, capitalization, and spaces!"
        /bin
        /bin/exe
        /bin/exe/file
        /filename.txt
        "\001\255"
        .
        ./.
        ././.
        ..
        ../..
        .hidden
        "This is a sentence; it has punctuation, capitalization, and spaces!"
        bin
        bin/exe
        bin/exe/file
        filename.txt))
      (Map
       ((/ 12)
        ("/\001\255" 19)
        (/. 13)
        (/./. 20)
        (/././. 22)
        (/.. 14)
        (/../.. 21)
        (/.hidden 17)
        ("/This is a sentence; it has punctuation, capitalization, and spaces!" 18)
        (/bin 16)
        (/bin/exe 23)
        (/bin/exe/file 24)
        (/filename.txt 15)
        ("\001\255" 6)
        (. 0)
        (./. 7)
        (././. 9)
        (.. 1)
        (../.. 8)
        (.hidden 4)
        ("This is a sentence; it has punctuation, capitalization, and spaces!" 5)
        (bin 3)
        (bin/exe 10)
        (bin/exe/file 11)
        (filename.txt 2)))
      (Hash_set
       (/
        "/\001\255"
        /.
        /./.
        /././.
        /..
        /../..
        /.hidden
        "/This is a sentence; it has punctuation, capitalization, and spaces!"
        /bin
        /bin/exe
        /bin/exe/file
        /filename.txt
        "\001\255"
        .
        ./.
        ././.
        ..
        ../..
        .hidden
        "This is a sentence; it has punctuation, capitalization, and spaces!"
        bin
        bin/exe
        bin/exe/file
        filename.txt))
      (Table
       ((/ 12)
        ("/\001\255" 19)
        (/. 13)
        (/./. 20)
        (/././. 22)
        (/.. 14)
        (/../.. 21)
        (/.hidden 17)
        ("/This is a sentence; it has punctuation, capitalization, and spaces!" 18)
        (/bin 16)
        (/bin/exe 23)
        (/bin/exe/file 24)
        (/filename.txt 15)
        ("\001\255" 6)
        (. 0)
        (./. 7)
        (././. 9)
        (.. 1)
        (../.. 8)
        (.hidden 4)
        ("This is a sentence; it has punctuation, capitalization, and spaces!" 5)
        (bin 3)
        (bin/exe 10)
        (bin/exe/file 11)
        (filename.txt 2))) |}]
  ;;
end
OCaml

Innovation. Community. Security.