what does this mean?
#define WS_RECURSIVE (1 << 0)
I understand that it will define WS_Recursive (1 << 0)
but w
<<
computes a bitwise shift to the left. Shifting 1 to the left by 0 bits simply leaves the result as 1.
I noticed also where you got your code from that there's also:
#define WS_RECURSIVE (1 << 0)
#define WS_DEFAULT WS_RECURSIVE
#define WS_FOLLOWLINK (1 << 1)
#define WS_DOTFILES (1 << 2)
#define WS_MATCHDIRS (1 << 3)
That is a way of creating bit fields, where you OR (|
) flags together, and AND them (&
) to check if they're set.