Skip to content

Commit

Permalink
private file_type
Browse files Browse the repository at this point in the history
  • Loading branch information
geckoxx committed Jun 8, 2021
1 parent c7af0e7 commit 783c524
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion crates/bevy_asset/src/io/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,19 @@ impl TryFrom<std::fs::FileType> for FileType {
/// This structure is returned from the [`AssetIo::get_metadata`] method.
#[derive(Debug, Clone)]
pub struct Metadata {
pub file_type: FileType,
file_type: FileType,
}

impl Metadata {
pub fn new(file_type: FileType) -> Self {
Self { file_type }
}

#[inline]
pub const fn file_type(&self) -> FileType {
self.file_type
}

#[inline]
pub const fn is_dir(&self) -> bool {
self.file_type.is_dir()
Expand Down

0 comments on commit 783c524

Please sign in to comment.