// A SIDECAR'S TEXT, READ ONLY WHILE IT IS A SIDECAR'S SIZE: a film's NFO or a// song's LRC beside it is a few kilobytes, but the name alone says nothing// of what the file holds. One byte past the most is read to know the file is// longer, and then it is none — never a whole body in memory// (`WholeBodySweepTests`).importFoundationenumBoundedText {/// The file's text (read as UTF-8) when it holds at most `most` bytes;/// nil when it is longer or cannot be read.staticfunc read(_ url: URL, most: Int) -> String? {guardlet handle = try? FileHandle(forReadingFrom: url) else { returnnil }defer { try? handle.close() }let data: Datado { data = try handle.read(upToCount: most + 1) ?? Data() } catch { returnnil }guard data.count <= most else { returnnil }returnString(decoding: data, as: UTF8.self) }}