Skip to content

Commit

Permalink
more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
mockersf committed Sep 14, 2023
1 parent 16fa0f2 commit 2f74a1b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/bevy_asset/src/io/file/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ impl FileAssetReader {
/// See `get_base_path` below.
pub fn new<P: AsRef<Path>>(path: P) -> Self {
let root_path = Self::get_base_path().join(path.as_ref());
println!("FileAssetReader::new creating directory {:?}", root_path);
std::fs::create_dir_all(&root_path).unwrap_or_else(|e| {
panic!(
"Failed to create root directory {:?} for file asset reader: {:?}",
Expand Down Expand Up @@ -238,6 +239,7 @@ impl AssetWriter for FileAssetWriter {
&'a self,
path: &'a Path,
) -> BoxedFuture<'a, std::result::Result<(), AssetWriterError>> {
println!("FileAssetWriter::remove {:?}", path);
Box::pin(async move {
let full_path = self.root_path.join(path);
async_fs::remove_file(full_path).await?;
Expand All @@ -249,6 +251,7 @@ impl AssetWriter for FileAssetWriter {
&'a self,
path: &'a Path,
) -> BoxedFuture<'a, std::result::Result<(), AssetWriterError>> {
println!("FileAssetWriter::remove_meta {:?}", path);
Box::pin(async move {
let meta_path = get_meta_path(path);
let full_path = self.root_path.join(meta_path);
Expand All @@ -261,6 +264,7 @@ impl AssetWriter for FileAssetWriter {
&'a self,
path: &'a Path,
) -> BoxedFuture<'a, std::result::Result<(), AssetWriterError>> {
println!("FileAssetWriter::remove_directory {:?}", path);
Box::pin(async move {
let full_path = self.root_path.join(path);
async_fs::remove_dir_all(full_path).await?;
Expand All @@ -272,6 +276,7 @@ impl AssetWriter for FileAssetWriter {
&'a self,
path: &'a Path,
) -> BoxedFuture<'a, std::result::Result<(), AssetWriterError>> {
println!("FileAssetWriter::remove_empty_directory {:?}", path);
Box::pin(async move {
let full_path = self.root_path.join(path);
async_fs::remove_dir(full_path).await?;
Expand All @@ -283,6 +288,7 @@ impl AssetWriter for FileAssetWriter {
&'a self,
path: &'a Path,
) -> BoxedFuture<'a, std::result::Result<(), AssetWriterError>> {
println!("FileAssetWriter::remove_assets_in_directory {:?}", path);
Box::pin(async move {
let full_path = self.root_path.join(path);
async_fs::remove_dir_all(&full_path).await?;
Expand Down

0 comments on commit 2f74a1b

Please sign in to comment.