Implementing it in C might be a very large task, considering all possible block devices, symlinks, etc.