helloWorld199 commited on
Commit
fd62b34
1 Parent(s): 1d9a836

Update src/my_utils.py

Browse files
Files changed (1) hide show
  1. src/my_utils.py +6 -4
src/my_utils.py CHANGED
@@ -23,7 +23,9 @@ def load_audio(file, sr):
23
  return np.frombuffer(out, np.float32).flatten()
24
 
25
  def show_stored_files(root_dir):
26
- files = os.listdir(root_dir)
27
- for file in files:
28
- if os.path.isfile(os.path.join(root_dir, file)):
29
- print(os.path.join(root_dir, file))
 
 
 
23
  return np.frombuffer(out, np.float32).flatten()
24
 
25
  def show_stored_files(root_dir):
26
+ for entry in os.listdir(root_dir):
27
+ full_path = os.path.join(root_dir, entry)
28
+ if os.path.isdir(full_path):
29
+ print(f"Directory: {full_path}")
30
+ elif os.path.isfile(full_path):
31
+ print(f"File: {full_path}")