-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30609/#review82060
-----------------------------------------------------------



3rdparty/libprocess/3rdparty/stout/include/stout/os/stat.hpp
<https://reviews.apache.org/r/30609/#comment132722>

    If we add `followSymlinks` here, it seems that one could add 
`followSymlinks` on all of the `stat` related methods, but that seems like it 
would be a bit of a mess?
    
    I'm curious whether we should just expose two simple functions to force the 
callers to think about following links whenever they want file statistics:
    
    ```
    Try<Stat> stat(const std::string& path);
    Try<Stat> lstat(const std::string& path);
    ```
    
    Otherwise, do we want 1 stout function per `stat` struct member? For each 
function, are we going to have a `followSymlinks` boolean? Just thinking of how 
to provide a complete and consistent interface that is simple to reason about.


- Ben Mahler


On March 11, 2015, 5:06 p.m., Bernd Mathiske wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30609/
> -----------------------------------------------------------
> 
> (Updated March 11, 2015, 5:06 p.m.)
> 
> 
> Review request for mesos, Adam B, Benjamin Hindman, Till Toenshoff, and 
> Timothy Chen.
> 
> 
> Bugs: MESOS-2072
>     https://issues.apache.org/jira/browse/MESOS-2072
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This returns a file's size (on UNIXes as reported by lstat(), not stat()). It 
> is desired that in case of a link, the size of the link, not the size of the 
> referenced file, is returned.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/stat.hpp 
> af940a48b161c194f2efb529b3d589c543b12f61 
>   3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp 
> c396c1d2d833b2f1721092fa35b23b5c3c3d99b3 
> 
> Diff: https://reviews.apache.org/r/30609/diff/
> 
> 
> Testing
> -------
> 
> Wrote a simple test that creates a file and tests its size, and also checks 
> if a non-existing file yields an error.
> 
> 
> Thanks,
> 
> Bernd Mathiske
> 
>

Reply via email to