XcfFileInput constructor
Opens a file without reading its contents.
Implementation
factory XcfFileInput(String path, {int cacheBytes = 64 * 1024}) {
if (cacheBytes < 0) {
throw ArgumentError.value(cacheBytes, 'cacheBytes');
}
final RandomAccessFile file = File(path).openSync();
try {
return XcfFileInput._(file, file.lengthSync(), cacheBytes);
} catch (_) {
file.closeSync();
rethrow;
}
}