A
A
askogorev2014-02-21 09:02:10
C++ / C#
askogorev, 2014-02-21 09:02:10

How can boost check if a file is visible/invisible?

How can boost check if a file is visible/invisible?
Given: the path to the file
If you can do without third-party libraries, it would be better.
Still, a platform-independent solution is desirable.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
L
leclecovich, 2014-02-21
@leclecovich

No way. For Windows, use this .
For *nix, check for a dot at the beginning of the filename.

T
tugo, 2014-02-21
@tugo

www.boost.org/doc/libs/1_55_0/libs/filesystem/doc/...

D
DancingOnWater, 2014-02-21
@DancingOnWater

Among cross-platform tools, this is implemented in QDir from Qt, I suspect that in the boost you need to look in the same direction

E
Eugene, 2014-05-30
@EvgenijDv

What means

visibility/invisibility
?
Do you want to check if a file exists? Then boost::filesystem::exists() will help you.
And if you want to check if the flag is set to "hidden", then boost will not help you, because in Windows it is a flag in the file, and in nix it is a dot at the beginning of the file name.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question