/* * Copyright 2026 Flix Authors * * Use of this source code is governed by the Apache 2.0 license * that can be found in the LICENSE.md file. */////// Type of file size units, and its functions.///pubmod Fs.SizeUnit {////// Type of file size units.///pubenumSizeUnitwithEq, ToString {case Bytescase KiloBytescase MegaBytescase GigaBytescase TeraBytes }////// Returns the number of bytes for the given size unit `u`.///pubdeftoBytes(u: SizeUnit): Int64 = matchu {case SizeUnit.Bytes => 1i64,case SizeUnit.KiloBytes => 1_024i64,case SizeUnit.MegaBytes => 1_024i64*1_024i64,case SizeUnit.GigaBytes => 1_024i64*1_024i64*1_024i64,case SizeUnit.TeraBytes => 1_024i64*1_024i64*1_024i64*1_024i64 }}