/* * 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. */pubmod Fs.SizeUnit {////// Represents a size unit.///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 }}