Function addFile [src]

Deprecated; use addFilePath.

Prototype

pub fn addFile(self: *Manifest, file_path: []const u8, max_file_size: ?usize) !usize

Parameters

self: *Manifestfile_path: []const u8max_file_size: ?usize

Source

pub fn addFile(self: *Manifest, file_path: []const u8, max_file_size: ?usize) !usize { assert(self.manifest_file == null); const gpa = self.cache.gpa; try self.files.ensureUnusedCapacity(gpa, 1); const prefixed_path = try self.cache.findPrefix(file_path); errdefer gpa.free(prefixed_path.sub_path); return addFileInner(self, prefixed_path, null, max_file_size); }