Fix compilation with gcc
Add ApiFolder convenience api