Coverage / crates/flow/src/portable.rs 72.0%
18 of 25 lines run, 6 of 18 functions · run #190 on main · run missed
| 1 | //! What differs between the systems a runner runs on (oxygenflow#83): file | |
| 2 | //! modes, file identities and links are Unix's. On Windows, where a runner | |
| 3 | //! offers the WASM tier only, modes are not kept (files read as 0644 and | |
| 4 | //! directories as 0755), each file is its own, and sizes are lengths. | |
| 5 | | |
| 6 | use ; | |
| 7 | use io; | |
| 8 | use Path; | |
| 9 | ||
| 10 | /// Set `p`'s permission bits; nothing on Windows. | |
| 11 | 24× | |
| 12 | | |
| 13 | | |
| 14 | | |
| 15 | 24× | |
| 16 | | |
| 17 | | |
| 18 | | |
| 19 | | |
| 20 | | |
| 21 | | |
| 22 | 24× | |
| 23 | ||
| 24 | /// A file's permission bits (`0o7777` of its mode). | |
| 25 | 49× | |
| 26 | | |
| 27 | | |
| 28 | | |
| 29 | 49× | |
| 30 | | |
| 31 | | |
| 32 | | |
| 33 | | |
| 34 | | |
| 35 | | |
| 36 | | |
| 37 | | |
| 38 | | |
| 39 | | |
| 40 | 49× | |
| 41 | ||
| 42 | /// Open a new file readable and writable by its owner only. | |
| 43 | 29× | |
| 44 | | |
| 45 | | |
| 46 | | |
| 47 | 29× | |
| 48 | | |
| 49 | | |
| 50 | | |
| 51 | | |
| 52 | | |
| 53 | 29× | |
| 54 | ||
| 55 | /// Make `p` and its parents, the last only its owner's. | |
| 56 | 17× | |
| 57 | | |
| 58 | | |
| 59 | 17× | |
| 60 | | |
| 61 | | |
| 62 | | |
| 63 | | |
| 64 | | |
| 65 | 17× | |
| 66 | ||
| 67 | /// The disk a file takes: its blocks on Unix, its length elsewhere. | |
| 68 | 101× | |
| 69 | | |
| 70 | | |
| 71 | | |
| 72 | 101× | |
| 73 | | |
| 74 | | |
| 75 | | |
| 76 | | |
| 77 | | |
| 78 | 101× | |
| 79 | ||
| 80 | /// For a file with more than one name, what names it once (device, inode); | |
| 81 | /// `None` for a file with one name, a directory, or anywhere but Unix. | |
| 82 | 91× | |
| 83 | | |
| 84 | | |
| 85 | | |
| 86 | 91× | |
| 87 | | |
| 88 | | |
| 89 | | |
| 90 | | |
| 91 | | |
| 92 | | |
| 93 | 91× | |
| 94 | ||
| 95 | /// Make `link` a symbolic link to `target` (a file link on Windows, which | |
| 96 | /// needs Developer Mode or the right to make them). | |
| 97 | 0× | |
| 98 | | |
| 99 | | |
| 100 | 0× | |
| 101 | | |
| 102 | | |
| 103 | | |
| 104 | | |
| 105 | | |
| 106 | 0× | |
| 107 | ||
| 108 | /// Rename `from` to `to`, which must not exist. On Windows through | |
| 109 | /// `MoveFileExW`, which renames a program that is running, trying again | |
| 110 | /// while another program (a virus scanner) holds the file. | |
| 111 | 0× | |
| 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 | 0× | |
| 137 | | |
| 138 | 0× | |