Same file, but length becomes zero when put in a different directory

I'm trying to read an AVAudioFile into a buffer. I found that when the directory is

/Users/myusername/Library/Developer/CoreSimulator/Devices/112C1F73-326A-408F-B9CA-2DE6739D60F4/data/Containers/Data/Application/F98B01D3-8136-4188-8589-0E40E8C96559/Documents/rawAudioData/0_rawAudio.wav

the length becomes zero. But when I move the same file to

/Users/myusername/Downloads/swiftApps/0_rawAudio.wav

the length and becomes normal again.

I checked that the file is reachable phonebook directories. So why is this happening? Thanks!

Same file, but length becomes zero when put in a different directory
 
 
Q