Commit Graph

13 Commits

Author SHA1 Message Date
Carsten Haitzler 46abf6fc81 use new type member.
SVN revision: 54018
2010-10-30 05:59:39 +00:00
Vincent Torri 600053d7a9 [eio] improve documentation layout and add a tutorial for
eio_dir_copy()

SVN revision: 53704
2010-10-21 05:03:23 +00:00
Vincent Torri 3a5d43ea9c [eio] reorganize code like eina, clean up doc
SVN revision: 53688
2010-10-20 19:17:30 +00:00
Cedric BAIL ff69a72f47 * eio: add eio_dir_unlink.
SVN revision: 53664
2010-10-20 13:48:13 +00:00
Cedric BAIL ab4a53f091 * eio: add eio_dir_move.
SVN revision: 53657
2010-10-20 12:09:58 +00:00
Cedric BAIL f3b720812e * e, eio: fix ecore_thread_run breakage.
SVN revision: 53371
2010-10-13 17:46:02 +00:00
Carsten Haitzler 8cde3d4ba6 ok... bad eio hackers. you know setting things like gnu_source and
file_offset_bits .. CHANGES the size of structs like dirent? so if u
do it differently in different c files... u end up with.. GASP
different structs with different sizes! dont do this. unify everything
into eio_private.h so its at least CONSISTENT for eio's internals.



SVN revision: 53322
2010-10-13 00:26:12 +00:00
Vincent Torri 0304666261 improve doc. Now, cedric, it's up to you :p
SVN revision: 53308
2010-10-12 14:59:30 +00:00
Gustavo Sverzut Barbieri 98e0d9f009 safer and louder about errors.
SVN revision: 53204
2010-10-08 20:14:21 +00:00
Eduardo de Barros Lima 9910581b1c Eio: No need to #define _GNU_SOURCE
SVN revision: 53165
2010-10-07 21:06:54 +00:00
Cedric BAIL 71ae9cd4e5 * eio: reduce code duplication.
SVN revision: 53094
2010-10-06 09:54:00 +00:00
Cedric BAIL 96172a4066 * eio: fix coding style, the other way.
SVN revision: 53071
2010-10-05 16:57:51 +00:00
Cedric BAIL b3d7e3423f * eio: add eio_dir_copy.
Little example on how to use it :
#include <Ecore.h>
#include <Eio.h>

static void
_test_notify_cb(void *data, const Eio_Progress *info)
{
   switch (info->op)
     {
      case EIO_FILE_COPY:
         printf("[%s] %f%%\n", info->dest, info->percent);
         break;
      case EIO_DIR_COPY:
         printf("global [%li/%li] %f%%\n", info->current, info->max, info->percent);
         break;
     }
}

static void
_test_done_cb(void *data)
{
   printf("copy done\n");
   ecore_main_loop_quit();
}

static void
_test_error_cb(int error, void *data)
{
   fprintf(stderr, "error: [%s]\n", strerror(error));
   ecore_main_loop_quit();
}

int
main(int argc, char **argv)
{
   Eio_File *cp;

   if (argc != 3)
     {
        fprintf(stderr, "eio_cp source_file destination_file\n");
        return -1;
     }

   ecore_init();
   eio_init();

   cp = eio_dir_copy(argv[1], argv[2],
                     _test_notify_cb,
                     _test_done_cb,
                     _test_error_cb,
                     NULL);

   ecore_main_loop_begin();

   eio_shutdown();
   ecore_shutdown();

   return 0;
}

	NOTE: be aware that it's your duty to provide the "right target".
	Meaning that copying to '.' will copy the content directly inside
	'.' and not in a subdirectory.


SVN revision: 53069
2010-10-05 16:46:41 +00:00