Create ls implementation using c