Sometimes is right. The code should work on some filesystems, but it's dangerous to make any assumptions of this kind. One would need to know the documented behavior of a filesystem for this to be trusted, especially so across different implementations or versions of a filesystem as any undocumented behavior is apt to change.
Still, in the right circumstances, it's probably going to be the fastest option.