MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / extension

Method extension

atomic-repository/src/archive.rs:170–177  ·  view source on GitHub ↗

Get the file extension for this format.

(&self)

Source from the content-addressed store, hash-verified

168impl ArchiveFormat {
169 /// Get the file extension for this format.
170 pub fn extension(&self) -> &'static str {
171 match self {
172 Self::TarGz => ".tar.gz",
173 Self::Tar => ".tar",
174 Self::Directory => "",
175 Self::Zip => ".zip",
176 }
177 }
178
179 /// Detect format from a path.
180 pub fn from_path(path: &Path) -> Option<Self> {

Callers 5

list_activeFunction · 0.80
cleanup_expiredFunction · 0.80
ensure_extensionFunction · 0.80
next_from_filesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected