About the first question that might not be clear enough:
Lets say I want to get the first line of a text file.
when the file is located on the user's computer, it is easy.
I just mark the path and operate some algorithm.
My question is: can I just switch the file-path into a path which just reffers to a file located on the server, and then to run the algorithm as usual?

Hope it is clear now.