Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions lib/src/entry/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@ impl EntryBuilder {
}
}

/// Creates a new directory with the given name.
/// Creates a new [`EntryBuilder`] for a directory entry.
#[inline]
pub const fn new_dir(name: EntryName) -> Self {
Self::new(EntryHeader::for_dir(name))
}

/// Creates a new file with the given name and write options.
/// Creates a new [`EntryBuilder`] for a file entry with the given write options.
///
/// # Errors
///
Expand Down Expand Up @@ -218,7 +218,7 @@ impl EntryBuilder {
})
}

/// Creates a new symbolic link with the given name and link.
/// Creates a new [`EntryBuilder`] for a symbolic link entry pointing to the given source.
///
/// # Errors
///
Expand All @@ -229,8 +229,8 @@ impl EntryBuilder {
/// use libpna::{EntryBuilder, EntryName, EntryReference};
///
/// let builder = EntryBuilder::new_symlink(
/// EntryName::try_from("path/of/target").unwrap(),
/// EntryReference::try_from("path/of/source").unwrap(),
/// EntryName::try_from("path/of/link").unwrap(),
/// EntryReference::try_from("path/of/target").unwrap(),
/// )
/// .unwrap();
/// let entry = builder.build().unwrap();
Expand All @@ -240,7 +240,7 @@ impl EntryBuilder {
Self::new_link(EntryHeader::for_symlink(name), source)
}

/// Creates a new hard link with the given name and link.
/// Creates a new [`EntryBuilder`] for a hard link entry pointing to the given source.
///
/// # Errors
///
Expand All @@ -251,8 +251,8 @@ impl EntryBuilder {
/// use libpna::{EntryBuilder, EntryName, EntryReference};
///
/// let builder = EntryBuilder::new_hard_link(
/// EntryName::try_from("path/of/target").unwrap(),
/// EntryReference::try_from("path/of/source").unwrap(),
/// EntryName::try_from("path/of/link").unwrap(),
/// EntryReference::try_from("path/of/target").unwrap(),
/// )
/// .unwrap();
/// let entry = builder.build().unwrap();
Expand Down
Loading