Programa para el testeo de algunas funciones de la biblioteca.
Este programa solo hace una prueba simple de las funciones que hice mas al tun tun.
#include <stdio.h>
#include <stdlib.h>
#include <pds/pdsdatafunc.h>
int main(int argc, char* argv[])
{
const char *noexistent_file = "XXX";
const char * existent_file = argv[0];
printf("\n");
if(
pds_is_file(noexistent_file)==FALSE) printf(
"It is not a file : %s\n",noexistent_file);
else printf("It is a file : %s\n",noexistent_file);
if(
pds_is_file(existent_file)==FALSE) printf(
"It is not a file : %s\n",existent_file);
else printf("It is a file : %s\n",existent_file);
if(
pds_is_file(existent_dir)==FALSE) printf(
"It is not a file : %s\n",existent_dir);
else printf("It is a file : %s\n",existent_dir);
printf("\n");
if(
pds_is_dir(noexistent_file)==FALSE) printf(
"It is not a dir : %s\n",noexistent_file);
else printf("It is a dir : %s\n",noexistent_file);
if(
pds_is_dir(existent_file)==FALSE) printf(
"It is not a dir : %s\n",existent_file);
else printf("It is a dir : %s\n",existent_file);
if(
pds_is_dir(existent_dir)==FALSE) printf(
"It is not a dir : %s\n",existent_dir);
else printf("It is a dir : %s\n",existent_dir);
printf("\n");
if(
pds_exist_file(noexistent_file)==FALSE) printf(
"It not exist the file : %s\n",noexistent_file);
else printf("It exist the file : %s\n",noexistent_file);
if(
pds_exist_file(existent_file)==FALSE) printf(
"It not exist the file : %s\n",existent_file);
else printf("It exist the file : %s\n",existent_file);
if(
pds_exist_file(existent_dir)==FALSE) printf(
"It not exist the file : %s\n",existent_dir);
else printf("It exist the file : %s\n",existent_dir);
printf("\n");
else printf("It is accessible : %s\n",noexistent_file);
else printf("It is accessible : %s\n",existent_file);
else printf("It is accessible : %s\n",existent_dir);
printf("\n");
return EXIT_SUCCESS;
}