android/app/jni/extern/nfd-modified/test/test_pickfolder.c
raw| 1 | #include "nfd.h" |
| 2 | |
| 3 | #include <stdio.h> |
| 4 | #include <stdlib.h> |
| 5 | |
| 6 | |
| 7 | /* this test should compile on all supported platforms */ |
| 8 | |
| 9 | int main( void ) |
| 10 | { |
| 11 | nfdchar_t *outPath = NULL; |
| 12 | nfdresult_t result = NFD_PickFolder( NULL, &outPath ); |
| 13 | if ( result == NFD_OKAY ) |
| 14 | { |
| 15 | puts("Success!"); |
| 16 | puts(outPath); |
| 17 | free(outPath); |
| 18 | } |
| 19 | else if ( result == NFD_CANCEL ) |
| 20 | { |
| 21 | puts("User pressed cancel."); |
| 22 | } |
| 23 | else |
| 24 | { |
| 25 | printf("Error: %s\n", NFD_GetError() ); |
| 26 | } |
| 27 | |
| 28 | return 0; |
| 29 | } |