iz
Clone
https://git.tahinli.com/Tahinli/iz.git
0 watching0 forksRustAGPL-3.0567.3 KiB3950aceTahinli27 days ago34 commits
| 1 | //! Previews of files that are read as text: the first part of a text file, escaped by the page. Nothing |
| 2 | //! here decides whether a file may be shown; the caller has checked the viewer kind and the caller's |
| 3 | //! right to read the file. |
| 4 | |
| 5 | use Read; |
| 6 | use Path; |
| 7 | |
| 8 | use crateResult; |
| 9 | |
| 10 | /// Reads at most `cap` bytes of `path` as text. Returns the text (invalid UTF-8 replaced) and whether the file |
| 11 | /// was longer than the cap. |
| 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 |