[ee122] proj1b reading files from current working directory??

Richard Schmidt huntingtonsurfca at gmail.com
Thu Oct 25 21:18:38 PDT 2007


If you really want to use the full working directory:

popen("pwd", "r") --> returns a pipe-stream with the 'working
directory' (pwd is  a unix command for that).

If you want to, you can do what Lisa suggested (strcat-ing the request
to '.'), or you can just shave off the preceding '/' and Unix knows
what you're talking about.

Rick

On 10/25/07, Drew Lustro <drewlustro at gmail.com> wrote:
> How do you find the current working directory of the process for
> http_server?
>
> So like when you wanna get /foo.html how do you get
>
> /Users/drew/Eclipse/ee122-Server/Debug/ as the current working
> directory (as a string) in order to then to concat foo.html ??
>
> Drew
>
> _______________________________________________
> ee122 mailing list
> ee122 at mailman.ICSI.Berkeley.EDU
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/ee122
>


More information about the ee122 mailing list