Reading line by line from a text file using FILEX

I wish to read line by line from a text file using filex.

I just could not get this working by using filex file_read api, as it reads whatever bytes we ask as arguments(request size),

Do we any function like fgets() to stop reading when it encounters a \n character.

Please help