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

Method new

atomic-core/src/record/item.rs:322–327  ·  view source on GitHub ↗

Create new file metadata. # Arguments `permissions` - Unix permission bits (e.g., 0o644) `is_directory` - Whether this is a directory # Example ```rust use atomic_core::record::FileMetadata; let meta = FileMetadata::new(0o755, false); assert!(meta.is_executable()); assert!(!meta.is_dir()); ```

(permissions: u16, is_directory: bool)

Source from the content-addressed store, hash-verified

320 /// assert!(!meta.is_dir());
321 /// ```
322 pub fn new(permissions: u16, is_directory: bool) -> Self {
323 Self {
324 permissions,
325 is_directory,
326 }
327 }
328
329 /// Create metadata for a regular file with default permissions (0o644).
330 ///

Callers

nothing calls this directly

Calls 1

file_nameMethod · 0.80

Tested by

no test coverage detected