문제

I want to get the owner and group from a file using boost::filesystem, but never found any way to do so.

I can get the file's permissions, but as I don't know the file's owner this just doesn't mean anything.

I found the posix fstat function, but again I'd like to use boost or another C++ library rather than C functions.

도움이 되었습니까?

해결책

What you're asking to do is a Unix system call. But you don't want to call it? Why? What possible value could boost provide? It's not portability, as nothing outside of a Unix is going to have a meaningful st_gid field.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top