@grain/stdlib 0.7.0 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/array.md +491 -491
  3. package/bigint.md +198 -198
  4. package/buffer.gr +66 -1
  5. package/buffer.md +395 -272
  6. package/bytes.gr +1 -0
  7. package/bytes.md +200 -199
  8. package/char.md +125 -125
  9. package/exception.md +9 -9
  10. package/float32.md +195 -195
  11. package/float64.md +195 -195
  12. package/fs.md +115 -115
  13. package/hash.md +16 -16
  14. package/int16.md +155 -155
  15. package/int32.gr +1 -1
  16. package/int32.md +207 -207
  17. package/int64.gr +1 -1
  18. package/int64.md +207 -207
  19. package/int8.md +155 -155
  20. package/json.md +59 -59
  21. package/list.md +347 -347
  22. package/map.md +222 -222
  23. package/marshal.md +12 -12
  24. package/number.gr +119 -5
  25. package/number.md +503 -261
  26. package/option.md +141 -141
  27. package/package.json +2 -2
  28. package/path.gr +82 -65
  29. package/path.md +210 -141
  30. package/pervasives.md +238 -238
  31. package/priorityqueue.md +112 -112
  32. package/queue.md +117 -117
  33. package/random.md +37 -37
  34. package/range.md +36 -36
  35. package/rational.md +107 -107
  36. package/regex.md +91 -91
  37. package/result.md +102 -102
  38. package/runtime/atof/decimal.md +6 -6
  39. package/runtime/compare.md +7 -7
  40. package/runtime/dataStructures.md +178 -178
  41. package/runtime/equal.md +7 -7
  42. package/runtime/exception.md +15 -15
  43. package/runtime/malloc.md +9 -9
  44. package/runtime/numbers.md +269 -269
  45. package/runtime/string.md +17 -17
  46. package/runtime/unsafe/conv.md +6 -6
  47. package/runtime/unsafe/memory.gr +2 -19
  48. package/runtime/unsafe/memory.md +10 -10
  49. package/runtime/utf8.md +31 -31
  50. package/runtime/wasi.md +9 -9
  51. package/set.md +211 -211
  52. package/stack.md +122 -122
  53. package/string.md +228 -228
  54. package/uint16.md +148 -148
  55. package/uint32.md +192 -192
  56. package/uint64.md +192 -192
  57. package/uint8.md +148 -148
  58. package/uri.md +77 -77
  59. package/wasi/file.md +269 -269
  60. package/wasi/process.md +21 -21
  61. package/wasi/random.md +9 -9
  62. package/wasi/time.md +12 -12
package/wasi/file.md CHANGED
@@ -544,21 +544,21 @@ Open a file or directory.
544
544
 
545
545
  Parameters:
546
546
 
547
- |param|type|description|
548
- |-----|----|-----------|
549
- |`dirFd`|`FileDescriptor`|The directory in which path resolution starts|
550
- |`dirFlags`|`List<LookupFlag>`|Flags which affect path resolution|
551
- |`path`|`String`|The path to the file or directory|
552
- |`openFlags`|`List<OpenFlag>`|Flags that decide how the path will be opened|
553
- |`rights`|`List<Rights>`|The rights that dictate what may be done with the returned file descriptor|
554
- |`rightsInheriting`|`List<Rights>`|The rights that dictate what may be done with file descriptors derived from this file descriptor|
555
- |`flags`|`List<FdFlag>`|Flags which affect read/write operations on this file descriptor|
547
+ | param | type | description |
548
+ | ------------------ | ------------------ | ------------------------------------------------------------------------------------------------ |
549
+ | `dirFd` | `FileDescriptor` | The directory in which path resolution starts |
550
+ | `dirFlags` | `List<LookupFlag>` | Flags which affect path resolution |
551
+ | `path` | `String` | The path to the file or directory |
552
+ | `openFlags` | `List<OpenFlag>` | Flags that decide how the path will be opened |
553
+ | `rights` | `List<Rights>` | The rights that dictate what may be done with the returned file descriptor |
554
+ | `rightsInheriting` | `List<Rights>` | The rights that dictate what may be done with file descriptors derived from this file descriptor |
555
+ | `flags` | `List<FdFlag>` | Flags which affect read/write operations on this file descriptor |
556
556
 
557
557
  Returns:
558
558
 
559
- |type|description|
560
- |----|-----------|
561
- |`Result<FileDescriptor, Exception>`|`Ok(fd)` of the opened file or directory if successful or `Err(exception)` otherwise|
559
+ | type | description |
560
+ | ----------------------------------- | ------------------------------------------------------------------------------------ |
561
+ | `Result<FileDescriptor, Exception>` | `Ok(fd)` of the opened file or directory if successful or `Err(exception)` otherwise |
562
562
 
563
563
  ### File.**fdRead**
564
564
 
@@ -571,16 +571,16 @@ Read from a file descriptor.
571
571
 
572
572
  Parameters:
573
573
 
574
- |param|type|description|
575
- |-----|----|-----------|
576
- |`fd`|`FileDescriptor`|The file descriptor to read from|
577
- |`size`|`Number`|The maximum number of bytes to read from the file descriptor|
574
+ | param | type | description |
575
+ | ------ | ---------------- | ------------------------------------------------------------ |
576
+ | `fd` | `FileDescriptor` | The file descriptor to read from |
577
+ | `size` | `Number` | The maximum number of bytes to read from the file descriptor |
578
578
 
579
579
  Returns:
580
580
 
581
- |type|description|
582
- |----|-----------|
583
- |`Result<(Bytes, Number), Exception>`|`Ok((contents, numBytes))` of bytes read and the number of bytes read if successful or `Err(exception)` otherwise|
581
+ | type | description |
582
+ | ------------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
583
+ | `Result<(Bytes, Number), Exception>` | `Ok((contents, numBytes))` of bytes read and the number of bytes read if successful or `Err(exception)` otherwise |
584
584
 
585
585
  ### File.**fdPread**
586
586
 
@@ -594,17 +594,17 @@ Read from a file descriptor without updating the file descriptor's offset.
594
594
 
595
595
  Parameters:
596
596
 
597
- |param|type|description|
598
- |-----|----|-----------|
599
- |`fd`|`FileDescriptor`|The file descriptor to read from|
600
- |`offset`|`Int64`|The position within the file to begin reading|
601
- |`size`|`Number`|The maximum number of bytes to read from the file descriptor|
597
+ | param | type | description |
598
+ | -------- | ---------------- | ------------------------------------------------------------ |
599
+ | `fd` | `FileDescriptor` | The file descriptor to read from |
600
+ | `offset` | `Int64` | The position within the file to begin reading |
601
+ | `size` | `Number` | The maximum number of bytes to read from the file descriptor |
602
602
 
603
603
  Returns:
604
604
 
605
- |type|description|
606
- |----|-----------|
607
- |`Result<(Bytes, Number), Exception>`|`Ok((contents, numBytes))` of bytes read and the number of bytes read if successful or `Err(exception)` otherwise|
605
+ | type | description |
606
+ | ------------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
607
+ | `Result<(Bytes, Number), Exception>` | `Ok((contents, numBytes))` of bytes read and the number of bytes read if successful or `Err(exception)` otherwise |
608
608
 
609
609
  ### File.**fdPrestatGet**
610
610
 
@@ -621,15 +621,15 @@ Get information about a preopened directory.
621
621
 
622
622
  Parameters:
623
623
 
624
- |param|type|description|
625
- |-----|----|-----------|
626
- |`fd`|`FileDescriptor`|The file descriptor to check|
624
+ | param | type | description |
625
+ | ----- | ---------------- | ---------------------------- |
626
+ | `fd` | `FileDescriptor` | The file descriptor to check |
627
627
 
628
628
  Returns:
629
629
 
630
- |type|description|
631
- |----|-----------|
632
- |`Result<Prestat, Exception>`|`Ok(Dir{prefix, fd})` if successful or `Err(exception)` otherwise|
630
+ | type | description |
631
+ | ---------------------------- | ----------------------------------------------------------------- |
632
+ | `Result<Prestat, Exception>` | `Ok(Dir{prefix, fd})` if successful or `Err(exception)` otherwise |
633
633
 
634
634
  ### File.**fdWrite**
635
635
 
@@ -641,16 +641,16 @@ Write to a file descriptor.
641
641
 
642
642
  Parameters:
643
643
 
644
- |param|type|description|
645
- |-----|----|-----------|
646
- |`fd`|`FileDescriptor`|The file descriptor to which data will be written|
647
- |`data`|`Bytes`|The data to be written|
644
+ | param | type | description |
645
+ | ------ | ---------------- | ------------------------------------------------- |
646
+ | `fd` | `FileDescriptor` | The file descriptor to which data will be written |
647
+ | `data` | `Bytes` | The data to be written |
648
648
 
649
649
  Returns:
650
650
 
651
- |type|description|
652
- |----|-----------|
653
- |`Result<Number, Exception>`|`Ok(numBytes)` of the number of bytes written if successful or `Err(Exception)` otherwise|
651
+ | type | description |
652
+ | --------------------------- | ----------------------------------------------------------------------------------------- |
653
+ | `Result<Number, Exception>` | `Ok(numBytes)` of the number of bytes written if successful or `Err(Exception)` otherwise |
654
654
 
655
655
  ### File.**fdPwrite**
656
656
 
@@ -664,17 +664,17 @@ Write to a file descriptor without updating the file descriptor's offset.
664
664
 
665
665
  Parameters:
666
666
 
667
- |param|type|description|
668
- |-----|----|-----------|
669
- |`fd`|`FileDescriptor`|The file descriptor to which data will be written|
670
- |`data`|`Bytes`|The data to be written|
671
- |`offset`|`Int64`|The position within the file to begin writing|
667
+ | param | type | description |
668
+ | -------- | ---------------- | ------------------------------------------------- |
669
+ | `fd` | `FileDescriptor` | The file descriptor to which data will be written |
670
+ | `data` | `Bytes` | The data to be written |
671
+ | `offset` | `Int64` | The position within the file to begin writing |
672
672
 
673
673
  Returns:
674
674
 
675
- |type|description|
676
- |----|-----------|
677
- |`Result<Number, Exception>`|`Ok(numBytes)` of the number of bytes written if successful or `Err(exception)` otherwise|
675
+ | type | description |
676
+ | --------------------------- | ----------------------------------------------------------------------------------------- |
677
+ | `Result<Number, Exception>` | `Ok(numBytes)` of the number of bytes written if successful or `Err(exception)` otherwise |
678
678
 
679
679
  ### File.**fdAllocate**
680
680
 
@@ -687,17 +687,17 @@ Allocate space within a file.
687
687
 
688
688
  Parameters:
689
689
 
690
- |param|type|description|
691
- |-----|----|-----------|
692
- |`fd`|`FileDescriptor`|The file descriptor in which space will be allocated|
693
- |`offset`|`Int64`|The position within the file to begin writing|
694
- |`size`|`Int64`|The number of bytes to allocate|
690
+ | param | type | description |
691
+ | -------- | ---------------- | ---------------------------------------------------- |
692
+ | `fd` | `FileDescriptor` | The file descriptor in which space will be allocated |
693
+ | `offset` | `Int64` | The position within the file to begin writing |
694
+ | `size` | `Int64` | The number of bytes to allocate |
695
695
 
696
696
  Returns:
697
697
 
698
- |type|description|
699
- |----|-----------|
700
- |`Result<Void, Exception>`|`Ok(void)` if successful or `Err(exception)` otherwise|
698
+ | type | description |
699
+ | ------------------------- | ------------------------------------------------------ |
700
+ | `Result<Void, Exception>` | `Ok(void)` if successful or `Err(exception)` otherwise |
701
701
 
702
702
  ### File.**fdClose**
703
703
 
@@ -709,15 +709,15 @@ Close a file descriptor.
709
709
 
710
710
  Parameters:
711
711
 
712
- |param|type|description|
713
- |-----|----|-----------|
714
- |`fd`|`FileDescriptor`|The file descriptor to close|
712
+ | param | type | description |
713
+ | ----- | ---------------- | ---------------------------- |
714
+ | `fd` | `FileDescriptor` | The file descriptor to close |
715
715
 
716
716
  Returns:
717
717
 
718
- |type|description|
719
- |----|-----------|
720
- |`Result<Void, Exception>`|`Ok(void)` if successful or `Err(exception)` otherwise|
718
+ | type | description |
719
+ | ------------------------- | ------------------------------------------------------ |
720
+ | `Result<Void, Exception>` | `Ok(void)` if successful or `Err(exception)` otherwise |
721
721
 
722
722
  ### File.**fdDatasync**
723
723
 
@@ -729,15 +729,15 @@ Synchronize the data of a file to disk.
729
729
 
730
730
  Parameters:
731
731
 
732
- |param|type|description|
733
- |-----|----|-----------|
734
- |`fd`|`FileDescriptor`|The file descriptor to synchronize|
732
+ | param | type | description |
733
+ | ----- | ---------------- | ---------------------------------- |
734
+ | `fd` | `FileDescriptor` | The file descriptor to synchronize |
735
735
 
736
736
  Returns:
737
737
 
738
- |type|description|
739
- |----|-----------|
740
- |`Result<Void, Exception>`|`Ok(void)` if successful or `Err(exception)` otherwise|
738
+ | type | description |
739
+ | ------------------------- | ------------------------------------------------------ |
740
+ | `Result<Void, Exception>` | `Ok(void)` if successful or `Err(exception)` otherwise |
741
741
 
742
742
  ### File.**fdSync**
743
743
 
@@ -749,15 +749,15 @@ Synchronize the data and metadata of a file to disk.
749
749
 
750
750
  Parameters:
751
751
 
752
- |param|type|description|
753
- |-----|----|-----------|
754
- |`fd`|`FileDescriptor`|The file descriptor to synchronize|
752
+ | param | type | description |
753
+ | ----- | ---------------- | ---------------------------------- |
754
+ | `fd` | `FileDescriptor` | The file descriptor to synchronize |
755
755
 
756
756
  Returns:
757
757
 
758
- |type|description|
759
- |----|-----------|
760
- |`Result<Void, Exception>`|`Ok(void)` if successful or `Err(exception)` otherwise|
758
+ | type | description |
759
+ | ------------------------- | ------------------------------------------------------ |
760
+ | `Result<Void, Exception>` | `Ok(void)` if successful or `Err(exception)` otherwise |
761
761
 
762
762
  ### File.**fdStats**
763
763
 
@@ -769,15 +769,15 @@ Retrieve information about a file descriptor.
769
769
 
770
770
  Parameters:
771
771
 
772
- |param|type|description|
773
- |-----|----|-----------|
774
- |`fd`|`FileDescriptor`|The file descriptor of which to retrieve information|
772
+ | param | type | description |
773
+ | ----- | ---------------- | ---------------------------------------------------- |
774
+ | `fd` | `FileDescriptor` | The file descriptor of which to retrieve information |
775
775
 
776
776
  Returns:
777
777
 
778
- |type|description|
779
- |----|-----------|
780
- |`Result<Stats, Exception>`|`Ok(stats)` of the `Stats` associated with the file descriptor if successful or `Err(exception)` otherwise|
778
+ | type | description |
779
+ | -------------------------- | ---------------------------------------------------------------------------------------------------------- |
780
+ | `Result<Stats, Exception>` | `Ok(stats)` of the `Stats` associated with the file descriptor if successful or `Err(exception)` otherwise |
781
781
 
782
782
  ### File.**fdSetFlags**
783
783
 
@@ -790,16 +790,16 @@ Update the flags associated with a file descriptor.
790
790
 
791
791
  Parameters:
792
792
 
793
- |param|type|description|
794
- |-----|----|-----------|
795
- |`fd`|`FileDescriptor`|The file descriptor to update flags|
796
- |`flags`|`List<FdFlag>`|The flags to apply to the file descriptor|
793
+ | param | type | description |
794
+ | ------- | ---------------- | ----------------------------------------- |
795
+ | `fd` | `FileDescriptor` | The file descriptor to update flags |
796
+ | `flags` | `List<FdFlag>` | The flags to apply to the file descriptor |
797
797
 
798
798
  Returns:
799
799
 
800
- |type|description|
801
- |----|-----------|
802
- |`Result<Void, Exception>`|`Ok(void)` if successful or `Err(exception)` otherwise|
800
+ | type | description |
801
+ | ------------------------- | ------------------------------------------------------ |
802
+ | `Result<Void, Exception>` | `Ok(void)` if successful or `Err(exception)` otherwise |
803
803
 
804
804
  ### File.**fdSetRights**
805
805
 
@@ -813,17 +813,17 @@ Update the rights associated with a file descriptor.
813
813
 
814
814
  Parameters:
815
815
 
816
- |param|type|description|
817
- |-----|----|-----------|
818
- |`fd`|`FileDescriptor`|The file descriptor to update rights|
819
- |`rights`|`List<Rights>`|Rights to apply to the file descriptor|
820
- |`rightsInheriting`|`List<Rights>`|Inheriting rights to apply to the file descriptor|
816
+ | param | type | description |
817
+ | ------------------ | ---------------- | ------------------------------------------------- |
818
+ | `fd` | `FileDescriptor` | The file descriptor to update rights |
819
+ | `rights` | `List<Rights>` | Rights to apply to the file descriptor |
820
+ | `rightsInheriting` | `List<Rights>` | Inheriting rights to apply to the file descriptor |
821
821
 
822
822
  Returns:
823
823
 
824
- |type|description|
825
- |----|-----------|
826
- |`Result<Void, Exception>`|`Ok(void)` if successful or `Err(exception)` otherwise|
824
+ | type | description |
825
+ | ------------------------- | ------------------------------------------------------ |
826
+ | `Result<Void, Exception>` | `Ok(void)` if successful or `Err(exception)` otherwise |
827
827
 
828
828
  ### File.**fdFilestats**
829
829
 
@@ -835,15 +835,15 @@ Retrieve information about a file.
835
835
 
836
836
  Parameters:
837
837
 
838
- |param|type|description|
839
- |-----|----|-----------|
840
- |`fd`|`FileDescriptor`|The file descriptor of the file to retrieve information|
838
+ | param | type | description |
839
+ | ----- | ---------------- | ------------------------------------------------------- |
840
+ | `fd` | `FileDescriptor` | The file descriptor of the file to retrieve information |
841
841
 
842
842
  Returns:
843
843
 
844
- |type|description|
845
- |----|-----------|
846
- |`Result<Filestats, Exception>`|`Ok(info)` of the `Filestats` associated with the file descriptor if successful or `Err(exception)` otherwise|
844
+ | type | description |
845
+ | ------------------------------ | ------------------------------------------------------------------------------------------------------------- |
846
+ | `Result<Filestats, Exception>` | `Ok(info)` of the `Filestats` associated with the file descriptor if successful or `Err(exception)` otherwise |
847
847
 
848
848
  ### File.**fdSetSize**
849
849
 
@@ -855,16 +855,16 @@ Set (truncate) the size of a file.
855
855
 
856
856
  Parameters:
857
857
 
858
- |param|type|description|
859
- |-----|----|-----------|
860
- |`fd`|`FileDescriptor`|The file descriptor of the file to truncate|
861
- |`size`|`Int64`|The number of bytes to retain in the file|
858
+ | param | type | description |
859
+ | ------ | ---------------- | ------------------------------------------- |
860
+ | `fd` | `FileDescriptor` | The file descriptor of the file to truncate |
861
+ | `size` | `Int64` | The number of bytes to retain in the file |
862
862
 
863
863
  Returns:
864
864
 
865
- |type|description|
866
- |----|-----------|
867
- |`Result<Void, Exception>`|`Ok(void)` if successful or `Err(exception)` otherwise|
865
+ | type | description |
866
+ | ------------------------- | ------------------------------------------------------ |
867
+ | `Result<Void, Exception>` | `Ok(void)` if successful or `Err(exception)` otherwise |
868
868
 
869
869
  ### File.**fdSetAccessTime**
870
870
 
@@ -877,16 +877,16 @@ Set the access (created) time of a file.
877
877
 
878
878
  Parameters:
879
879
 
880
- |param|type|description|
881
- |-----|----|-----------|
882
- |`fd`|`FileDescriptor`|The file descriptor of the file to update|
883
- |`timestamp`|`Int64`|The time to set|
880
+ | param | type | description |
881
+ | ----------- | ---------------- | ----------------------------------------- |
882
+ | `fd` | `FileDescriptor` | The file descriptor of the file to update |
883
+ | `timestamp` | `Int64` | The time to set |
884
884
 
885
885
  Returns:
886
886
 
887
- |type|description|
888
- |----|-----------|
889
- |`Result<Void, Exception>`|`Ok(void)` if successful or `Err(exception)` otherwise|
887
+ | type | description |
888
+ | ------------------------- | ------------------------------------------------------ |
889
+ | `Result<Void, Exception>` | `Ok(void)` if successful or `Err(exception)` otherwise |
890
890
 
891
891
  ### File.**fdSetAccessTimeNow**
892
892
 
@@ -898,15 +898,15 @@ Set the access (created) time of a file to the current time.
898
898
 
899
899
  Parameters:
900
900
 
901
- |param|type|description|
902
- |-----|----|-----------|
903
- |`fd`|`FileDescriptor`|The file descriptor of the file to update|
901
+ | param | type | description |
902
+ | ----- | ---------------- | ----------------------------------------- |
903
+ | `fd` | `FileDescriptor` | The file descriptor of the file to update |
904
904
 
905
905
  Returns:
906
906
 
907
- |type|description|
908
- |----|-----------|
909
- |`Result<Void, Exception>`|`Ok(void)` if successful or `Err(exception)` otherwise|
907
+ | type | description |
908
+ | ------------------------- | ------------------------------------------------------ |
909
+ | `Result<Void, Exception>` | `Ok(void)` if successful or `Err(exception)` otherwise |
910
910
 
911
911
  ### File.**fdSetModifiedTime**
912
912
 
@@ -919,16 +919,16 @@ Set the modified time of a file.
919
919
 
920
920
  Parameters:
921
921
 
922
- |param|type|description|
923
- |-----|----|-----------|
924
- |`fd`|`FileDescriptor`|The file descriptor of the file to update|
925
- |`timestamp`|`Int64`|The time to set|
922
+ | param | type | description |
923
+ | ----------- | ---------------- | ----------------------------------------- |
924
+ | `fd` | `FileDescriptor` | The file descriptor of the file to update |
925
+ | `timestamp` | `Int64` | The time to set |
926
926
 
927
927
  Returns:
928
928
 
929
- |type|description|
930
- |----|-----------|
931
- |`Result<Void, Exception>`|`Ok(void)` if successful or `Err(exception)` otherwise|
929
+ | type | description |
930
+ | ------------------------- | ------------------------------------------------------ |
931
+ | `Result<Void, Exception>` | `Ok(void)` if successful or `Err(exception)` otherwise |
932
932
 
933
933
  ### File.**fdSetModifiedTimeNow**
934
934
 
@@ -940,15 +940,15 @@ Set the modified time of a file to the current time.
940
940
 
941
941
  Parameters:
942
942
 
943
- |param|type|description|
944
- |-----|----|-----------|
945
- |`fd`|`FileDescriptor`|The file descriptor of the file to update|
943
+ | param | type | description |
944
+ | ----- | ---------------- | ----------------------------------------- |
945
+ | `fd` | `FileDescriptor` | The file descriptor of the file to update |
946
946
 
947
947
  Returns:
948
948
 
949
- |type|description|
950
- |----|-----------|
951
- |`Result<Void, Exception>`|`Ok(void)` if successful or `Err(exception)` otherwise|
949
+ | type | description |
950
+ | ------------------------- | ------------------------------------------------------ |
951
+ | `Result<Void, Exception>` | `Ok(void)` if successful or `Err(exception)` otherwise |
952
952
 
953
953
  ### File.**fdReaddir**
954
954
 
@@ -960,15 +960,15 @@ Read the entires of a directory.
960
960
 
961
961
  Parameters:
962
962
 
963
- |param|type|description|
964
- |-----|----|-----------|
965
- |`fd`|`FileDescriptor`|The directory to read|
963
+ | param | type | description |
964
+ | ----- | ---------------- | --------------------- |
965
+ | `fd` | `FileDescriptor` | The directory to read |
966
966
 
967
967
  Returns:
968
968
 
969
- |type|description|
970
- |----|-----------|
971
- |`Result<Array<DirectoryEntry>, Exception>`|`Ok(dirEntries)` of an array of `DirectoryEntry` for each entry in the directory if successful or `Err(exception)` otherwise|
969
+ | type | description |
970
+ | ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
971
+ | `Result<Array<DirectoryEntry>, Exception>` | `Ok(dirEntries)` of an array of `DirectoryEntry` for each entry in the directory if successful or `Err(exception)` otherwise |
972
972
 
973
973
  ### File.**fdRenumber**
974
974
 
@@ -981,16 +981,16 @@ Atomically replace a file descriptor by renumbering another file descriptor.
981
981
 
982
982
  Parameters:
983
983
 
984
- |param|type|description|
985
- |-----|----|-----------|
986
- |`fromFd`|`FileDescriptor`|The file descriptor to renumber|
987
- |`toFd`|`FileDescriptor`|The file descriptor to overwrite|
984
+ | param | type | description |
985
+ | -------- | ---------------- | -------------------------------- |
986
+ | `fromFd` | `FileDescriptor` | The file descriptor to renumber |
987
+ | `toFd` | `FileDescriptor` | The file descriptor to overwrite |
988
988
 
989
989
  Returns:
990
990
 
991
- |type|description|
992
- |----|-----------|
993
- |`Result<Void, Exception>`|`Ok(void)` if successful or `Err(exception)` otherwise|
991
+ | type | description |
992
+ | ------------------------- | ------------------------------------------------------ |
993
+ | `Result<Void, Exception>` | `Ok(void)` if successful or `Err(exception)` otherwise |
994
994
 
995
995
  ### File.**fdSeek**
996
996
 
@@ -1004,17 +1004,17 @@ Update a file descriptor's offset.
1004
1004
 
1005
1005
  Parameters:
1006
1006
 
1007
- |param|type|description|
1008
- |-----|----|-----------|
1009
- |`fd`|`FileDescriptor`|The file descriptor to operate on|
1010
- |`offset`|`Int64`|The number of bytes to move the offset|
1011
- |`whence`|`Whence`|The location from which the offset is relative|
1007
+ | param | type | description |
1008
+ | -------- | ---------------- | ---------------------------------------------- |
1009
+ | `fd` | `FileDescriptor` | The file descriptor to operate on |
1010
+ | `offset` | `Int64` | The number of bytes to move the offset |
1011
+ | `whence` | `Whence` | The location from which the offset is relative |
1012
1012
 
1013
1013
  Returns:
1014
1014
 
1015
- |type|description|
1016
- |----|-----------|
1017
- |`Result<Int64, Exception>`|`Ok(offset)` of the new offset of the file descriptor, relative to the start of the file, if successful or `Err(exception)` otherwise|
1015
+ | type | description |
1016
+ | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
1017
+ | `Result<Int64, Exception>` | `Ok(offset)` of the new offset of the file descriptor, relative to the start of the file, if successful or `Err(exception)` otherwise |
1018
1018
 
1019
1019
  ### File.**fdTell**
1020
1020
 
@@ -1026,15 +1026,15 @@ Read a file descriptor's offset.
1026
1026
 
1027
1027
  Parameters:
1028
1028
 
1029
- |param|type|description|
1030
- |-----|----|-----------|
1031
- |`fd`|`FileDescriptor`|The file descriptor to read the offset|
1029
+ | param | type | description |
1030
+ | ----- | ---------------- | -------------------------------------- |
1031
+ | `fd` | `FileDescriptor` | The file descriptor to read the offset |
1032
1032
 
1033
1033
  Returns:
1034
1034
 
1035
- |type|description|
1036
- |----|-----------|
1037
- |`Result<Int64, Exception>`|`Ok(offset)` of the offset of the file descriptor, relative to the start of the file, if successful or `Err(exception)` otherwise|
1035
+ | type | description |
1036
+ | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
1037
+ | `Result<Int64, Exception>` | `Ok(offset)` of the offset of the file descriptor, relative to the start of the file, if successful or `Err(exception)` otherwise |
1038
1038
 
1039
1039
  ### File.**pathCreateDirectory**
1040
1040
 
@@ -1047,16 +1047,16 @@ Create a directory.
1047
1047
 
1048
1048
  Parameters:
1049
1049
 
1050
- |param|type|description|
1051
- |-----|----|-----------|
1052
- |`fd`|`FileDescriptor`|The file descriptor of the directory in which path resolution starts|
1053
- |`path`|`String`|The path to the new directory|
1050
+ | param | type | description |
1051
+ | ------ | ---------------- | -------------------------------------------------------------------- |
1052
+ | `fd` | `FileDescriptor` | The file descriptor of the directory in which path resolution starts |
1053
+ | `path` | `String` | The path to the new directory |
1054
1054
 
1055
1055
  Returns:
1056
1056
 
1057
- |type|description|
1058
- |----|-----------|
1059
- |`Result<Void, Exception>`|`Ok(void)` if successful or `Err(exception)` otherwise|
1057
+ | type | description |
1058
+ | ------------------------- | ------------------------------------------------------ |
1059
+ | `Result<Void, Exception>` | `Ok(void)` if successful or `Err(exception)` otherwise |
1060
1060
 
1061
1061
  ### File.**pathFilestats**
1062
1062
 
@@ -1070,17 +1070,17 @@ Retrieve information about a file.
1070
1070
 
1071
1071
  Parameters:
1072
1072
 
1073
- |param|type|description|
1074
- |-----|----|-----------|
1075
- |`fd`|`FileDescriptor`|The file descriptor of the directory in which path resolution starts|
1076
- |`dirFlags`|`List<LookupFlag>`|Flags which affect path resolution|
1077
- |`path`|`String`|The path to retrieve information about|
1073
+ | param | type | description |
1074
+ | ---------- | ------------------ | -------------------------------------------------------------------- |
1075
+ | `fd` | `FileDescriptor` | The file descriptor of the directory in which path resolution starts |
1076
+ | `dirFlags` | `List<LookupFlag>` | Flags which affect path resolution |
1077
+ | `path` | `String` | The path to retrieve information about |
1078
1078
 
1079
1079
  Returns:
1080
1080
 
1081
- |type|description|
1082
- |----|-----------|
1083
- |`Result<Filestats, Exception>`|`Ok(info)` of the `Filestats` associated with the file descriptor if successful or `Err(exception)` otherwise|
1081
+ | type | description |
1082
+ | ------------------------------ | ------------------------------------------------------------------------------------------------------------- |
1083
+ | `Result<Filestats, Exception>` | `Ok(info)` of the `Filestats` associated with the file descriptor if successful or `Err(exception)` otherwise |
1084
1084
 
1085
1085
  ### File.**pathSetAccessTime**
1086
1086
 
@@ -1094,18 +1094,18 @@ Set the access (created) time of a file.
1094
1094
 
1095
1095
  Parameters:
1096
1096
 
1097
- |param|type|description|
1098
- |-----|----|-----------|
1099
- |`fd`|`FileDescriptor`|The file descriptor of the directory in which path resolution starts|
1100
- |`dirFlags`|`List<LookupFlag>`|Flags which affect path resolution|
1101
- |`path`|`String`|The path to set the time|
1102
- |`timestamp`|`Int64`|The time to set|
1097
+ | param | type | description |
1098
+ | ----------- | ------------------ | -------------------------------------------------------------------- |
1099
+ | `fd` | `FileDescriptor` | The file descriptor of the directory in which path resolution starts |
1100
+ | `dirFlags` | `List<LookupFlag>` | Flags which affect path resolution |
1101
+ | `path` | `String` | The path to set the time |
1102
+ | `timestamp` | `Int64` | The time to set |
1103
1103
 
1104
1104
  Returns:
1105
1105
 
1106
- |type|description|
1107
- |----|-----------|
1108
- |`Result<Void, Exception>`|`Ok(void)` if successful or `Err(exception)` otherwise|
1106
+ | type | description |
1107
+ | ------------------------- | ------------------------------------------------------ |
1108
+ | `Result<Void, Exception>` | `Ok(void)` if successful or `Err(exception)` otherwise |
1109
1109
 
1110
1110
  ### File.**pathSetAccessTimeNow**
1111
1111
 
@@ -1119,17 +1119,17 @@ Set the access (created) time of a file to the current time.
1119
1119
 
1120
1120
  Parameters:
1121
1121
 
1122
- |param|type|description|
1123
- |-----|----|-----------|
1124
- |`fd`|`FileDescriptor`|The file descriptor of the directory in which path resolution starts|
1125
- |`dirFlags`|`List<LookupFlag>`|Flags which affect path resolution|
1126
- |`path`|`String`|The path to set the time|
1122
+ | param | type | description |
1123
+ | ---------- | ------------------ | -------------------------------------------------------------------- |
1124
+ | `fd` | `FileDescriptor` | The file descriptor of the directory in which path resolution starts |
1125
+ | `dirFlags` | `List<LookupFlag>` | Flags which affect path resolution |
1126
+ | `path` | `String` | The path to set the time |
1127
1127
 
1128
1128
  Returns:
1129
1129
 
1130
- |type|description|
1131
- |----|-----------|
1132
- |`Result<Void, Exception>`|`Ok(void)` if successful or `Err(exception)` otherwise|
1130
+ | type | description |
1131
+ | ------------------------- | ------------------------------------------------------ |
1132
+ | `Result<Void, Exception>` | `Ok(void)` if successful or `Err(exception)` otherwise |
1133
1133
 
1134
1134
  ### File.**pathSetModifiedTime**
1135
1135
 
@@ -1143,18 +1143,18 @@ Set the modified time of a file.
1143
1143
 
1144
1144
  Parameters:
1145
1145
 
1146
- |param|type|description|
1147
- |-----|----|-----------|
1148
- |`fd`|`FileDescriptor`|The file descriptor of the directory in which path resolution starts|
1149
- |`dirFlags`|`List<LookupFlag>`|Flags which affect path resolution|
1150
- |`path`|`String`|The path to set the time|
1151
- |`timestamp`|`Int64`|The time to set|
1146
+ | param | type | description |
1147
+ | ----------- | ------------------ | -------------------------------------------------------------------- |
1148
+ | `fd` | `FileDescriptor` | The file descriptor of the directory in which path resolution starts |
1149
+ | `dirFlags` | `List<LookupFlag>` | Flags which affect path resolution |
1150
+ | `path` | `String` | The path to set the time |
1151
+ | `timestamp` | `Int64` | The time to set |
1152
1152
 
1153
1153
  Returns:
1154
1154
 
1155
- |type|description|
1156
- |----|-----------|
1157
- |`Result<Void, Exception>`|`Ok(void)` if successful or `Err(exception)` otherwise|
1155
+ | type | description |
1156
+ | ------------------------- | ------------------------------------------------------ |
1157
+ | `Result<Void, Exception>` | `Ok(void)` if successful or `Err(exception)` otherwise |
1158
1158
 
1159
1159
  ### File.**pathSetModifiedTimeNow**
1160
1160
 
@@ -1168,17 +1168,17 @@ Set the modified time of a file to the current time.
1168
1168
 
1169
1169
  Parameters:
1170
1170
 
1171
- |param|type|description|
1172
- |-----|----|-----------|
1173
- |`fd`|`FileDescriptor`|The file descriptor of the directory in which path resolution starts|
1174
- |`dirFlags`|`List<LookupFlag>`|Flags which affect path resolution|
1175
- |`path`|`String`|The path to set the time|
1171
+ | param | type | description |
1172
+ | ---------- | ------------------ | -------------------------------------------------------------------- |
1173
+ | `fd` | `FileDescriptor` | The file descriptor of the directory in which path resolution starts |
1174
+ | `dirFlags` | `List<LookupFlag>` | Flags which affect path resolution |
1175
+ | `path` | `String` | The path to set the time |
1176
1176
 
1177
1177
  Returns:
1178
1178
 
1179
- |type|description|
1180
- |----|-----------|
1181
- |`Result<Void, Exception>`|`Ok(void)` if successful or `Err(exception)` otherwise|
1179
+ | type | description |
1180
+ | ------------------------- | ------------------------------------------------------ |
1181
+ | `Result<Void, Exception>` | `Ok(void)` if successful or `Err(exception)` otherwise |
1182
1182
 
1183
1183
  ### File.**pathLink**
1184
1184
 
@@ -1193,19 +1193,19 @@ Create a hard link.
1193
1193
 
1194
1194
  Parameters:
1195
1195
 
1196
- |param|type|description|
1197
- |-----|----|-----------|
1198
- |`sourceFd`|`FileDescriptor`|The file descriptor of the directory in which the source path resolution starts|
1199
- |`dirFlags`|`List<LookupFlag>`|Flags which affect path resolution|
1200
- |`sourcePath`|`String`|The path to the source of the link|
1201
- |`targetFd`|`FileDescriptor`|The file descriptor of the directory in which the target path resolution starts|
1202
- |`targetPath`|`String`|The path to the target of the link|
1196
+ | param | type | description |
1197
+ | ------------ | ------------------ | ------------------------------------------------------------------------------- |
1198
+ | `sourceFd` | `FileDescriptor` | The file descriptor of the directory in which the source path resolution starts |
1199
+ | `dirFlags` | `List<LookupFlag>` | Flags which affect path resolution |
1200
+ | `sourcePath` | `String` | The path to the source of the link |
1201
+ | `targetFd` | `FileDescriptor` | The file descriptor of the directory in which the target path resolution starts |
1202
+ | `targetPath` | `String` | The path to the target of the link |
1203
1203
 
1204
1204
  Returns:
1205
1205
 
1206
- |type|description|
1207
- |----|-----------|
1208
- |`Result<Void, Exception>`|`Ok(void)` if successful or `Err(exception)` otherwise|
1206
+ | type | description |
1207
+ | ------------------------- | ------------------------------------------------------ |
1208
+ | `Result<Void, Exception>` | `Ok(void)` if successful or `Err(exception)` otherwise |
1209
1209
 
1210
1210
  ### File.**pathSymlink**
1211
1211
 
@@ -1219,17 +1219,17 @@ Create a symlink.
1219
1219
 
1220
1220
  Parameters:
1221
1221
 
1222
- |param|type|description|
1223
- |-----|----|-----------|
1224
- |`fd`|`FileDescriptor`|The file descriptor of the directory in which path resolution starts|
1225
- |`sourcePath`|`String`|The path to the source of the link|
1226
- |`targetPath`|`String`|The path to the target of the link|
1222
+ | param | type | description |
1223
+ | ------------ | ---------------- | -------------------------------------------------------------------- |
1224
+ | `fd` | `FileDescriptor` | The file descriptor of the directory in which path resolution starts |
1225
+ | `sourcePath` | `String` | The path to the source of the link |
1226
+ | `targetPath` | `String` | The path to the target of the link |
1227
1227
 
1228
1228
  Returns:
1229
1229
 
1230
- |type|description|
1231
- |----|-----------|
1232
- |`Result<Void, Exception>`|`Ok(void)` if successful or `Err(exception)` otherwise|
1230
+ | type | description |
1231
+ | ------------------------- | ------------------------------------------------------ |
1232
+ | `Result<Void, Exception>` | `Ok(void)` if successful or `Err(exception)` otherwise |
1233
1233
 
1234
1234
  ### File.**pathUnlink**
1235
1235
 
@@ -1241,16 +1241,16 @@ Unlink a file.
1241
1241
 
1242
1242
  Parameters:
1243
1243
 
1244
- |param|type|description|
1245
- |-----|----|-----------|
1246
- |`fd`|`FileDescriptor`|The file descriptor of the directory in which path resolution starts|
1247
- |`path`|`String`|The path of the file to unlink|
1244
+ | param | type | description |
1245
+ | ------ | ---------------- | -------------------------------------------------------------------- |
1246
+ | `fd` | `FileDescriptor` | The file descriptor of the directory in which path resolution starts |
1247
+ | `path` | `String` | The path of the file to unlink |
1248
1248
 
1249
1249
  Returns:
1250
1250
 
1251
- |type|description|
1252
- |----|-----------|
1253
- |`Result<Void, Exception>`|`Ok(void)` if successful or `Err(exception)` otherwise|
1251
+ | type | description |
1252
+ | ------------------------- | ------------------------------------------------------ |
1253
+ | `Result<Void, Exception>` | `Ok(void)` if successful or `Err(exception)` otherwise |
1254
1254
 
1255
1255
  ### File.**pathReadlink**
1256
1256
 
@@ -1264,17 +1264,17 @@ Read the contents of a symbolic link.
1264
1264
 
1265
1265
  Parameters:
1266
1266
 
1267
- |param|type|description|
1268
- |-----|----|-----------|
1269
- |`fd`|`FileDescriptor`|The file descriptor of the directory in which path resolution starts|
1270
- |`path`|`String`|The path to the symlink|
1271
- |`size`|`Number`|The number of bytes to read|
1267
+ | param | type | description |
1268
+ | ------ | ---------------- | -------------------------------------------------------------------- |
1269
+ | `fd` | `FileDescriptor` | The file descriptor of the directory in which path resolution starts |
1270
+ | `path` | `String` | The path to the symlink |
1271
+ | `size` | `Number` | The number of bytes to read |
1272
1272
 
1273
1273
  Returns:
1274
1274
 
1275
- |type|description|
1276
- |----|-----------|
1277
- |`Result<(String, Number), Exception>`|`Ok((contents, numBytes))` of the bytes read and the number of bytes read if successful or `Err(exception)` otherwise|
1275
+ | type | description |
1276
+ | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
1277
+ | `Result<(String, Number), Exception>` | `Ok((contents, numBytes))` of the bytes read and the number of bytes read if successful or `Err(exception)` otherwise |
1278
1278
 
1279
1279
  ### File.**pathRemoveDirectory**
1280
1280
 
@@ -1287,16 +1287,16 @@ Remove a directory.
1287
1287
 
1288
1288
  Parameters:
1289
1289
 
1290
- |param|type|description|
1291
- |-----|----|-----------|
1292
- |`fd`|`FileDescriptor`|The file descriptor of the directory in which path resolution starts|
1293
- |`path`|`String`|The path to the directory to remove|
1290
+ | param | type | description |
1291
+ | ------ | ---------------- | -------------------------------------------------------------------- |
1292
+ | `fd` | `FileDescriptor` | The file descriptor of the directory in which path resolution starts |
1293
+ | `path` | `String` | The path to the directory to remove |
1294
1294
 
1295
1295
  Returns:
1296
1296
 
1297
- |type|description|
1298
- |----|-----------|
1299
- |`Result<Void, Exception>`|`Ok(void)` if successful or `Err(exception)` otherwise|
1297
+ | type | description |
1298
+ | ------------------------- | ------------------------------------------------------ |
1299
+ | `Result<Void, Exception>` | `Ok(void)` if successful or `Err(exception)` otherwise |
1300
1300
 
1301
1301
  ### File.**pathRename**
1302
1302
 
@@ -1310,18 +1310,18 @@ Rename a file or directory.
1310
1310
 
1311
1311
  Parameters:
1312
1312
 
1313
- |param|type|description|
1314
- |-----|----|-----------|
1315
- |`sourceFd`|`FileDescriptor`|The file descriptor of the directory in which the source path resolution starts|
1316
- |`sourcePath`|`String`|The path of the file to rename|
1317
- |`targetFd`|`FileDescriptor`|The file descriptor of the directory in which the target path resolution starts|
1318
- |`targetPath`|`String`|The new path of the file|
1313
+ | param | type | description |
1314
+ | ------------ | ---------------- | ------------------------------------------------------------------------------- |
1315
+ | `sourceFd` | `FileDescriptor` | The file descriptor of the directory in which the source path resolution starts |
1316
+ | `sourcePath` | `String` | The path of the file to rename |
1317
+ | `targetFd` | `FileDescriptor` | The file descriptor of the directory in which the target path resolution starts |
1318
+ | `targetPath` | `String` | The new path of the file |
1319
1319
 
1320
1320
  Returns:
1321
1321
 
1322
- |type|description|
1323
- |----|-----------|
1324
- |`Result<Void, Exception>`|`Ok(void)` if successful or `Err(exception)` otherwise|
1322
+ | type | description |
1323
+ | ------------------------- | ------------------------------------------------------ |
1324
+ | `Result<Void, Exception>` | `Ok(void)` if successful or `Err(exception)` otherwise |
1325
1325
 
1326
1326
  ### File.**open**
1327
1327
 
@@ -1341,17 +1341,17 @@ Similar to `pathOpen`, but resolves the path relative to preopened directories.
1341
1341
 
1342
1342
  Parameters:
1343
1343
 
1344
- |param|type|description|
1345
- |-----|----|-----------|
1346
- |`path`|`String`|The path to the file or directory|
1347
- |`openFlags`|`List<OpenFlag>`|Flags that decide how the path will be opened|
1348
- |`rights`|`List<Rights>`|The rights that dictate what may be done with the returned file descriptor|
1349
- |`rightsInheriting`|`List<Rights>`|The rights that dictate what may be done with file descriptors derived from this file descriptor|
1350
- |`flags`|`List<FdFlag>`|Flags which affect read/write operations on this file descriptor|
1344
+ | param | type | description |
1345
+ | ------------------ | ---------------- | ------------------------------------------------------------------------------------------------ |
1346
+ | `path` | `String` | The path to the file or directory |
1347
+ | `openFlags` | `List<OpenFlag>` | Flags that decide how the path will be opened |
1348
+ | `rights` | `List<Rights>` | The rights that dictate what may be done with the returned file descriptor |
1349
+ | `rightsInheriting` | `List<Rights>` | The rights that dictate what may be done with file descriptors derived from this file descriptor |
1350
+ | `flags` | `List<FdFlag>` | Flags which affect read/write operations on this file descriptor |
1351
1351
 
1352
1352
  Returns:
1353
1353
 
1354
- |type|description|
1355
- |----|-----------|
1356
- |`Result<FileDescriptor, Exception>`|`Ok(fd)` of the opened file or directory if successful or `Err(exception)` otherwise|
1354
+ | type | description |
1355
+ | ----------------------------------- | ------------------------------------------------------------------------------------ |
1356
+ | `Result<FileDescriptor, Exception>` | `Ok(fd)` of the opened file or directory if successful or `Err(exception)` otherwise |
1357
1357