efl/legacy/eio/src/lib
Cedric BAIL 7088845157 * eio: add eio_file_move (completly asynchronous and non
blocking move). It first try a rename, then fallback to
	an eio_file_copy + eio_file_unlink.

Small example on how to use it :
#include <Ecore.h>
#include <Eio.h>

static void
_test_done_cb(void *data)
{
   printf("move 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_file_move(argv[1], argv[2],
                      NULL,
                      _test_done_cb,
                      _test_error_cb,
                      NULL);

   ecore_main_loop_begin();

   eio_shutdown();
   ecore_shutdown();

   return 0;
}


SVN revision: 52845
2010-09-28 09:05:51 +00:00
..
Eio.h * eio: add eio_file_copy (using splice when available and 2010-09-26 21:47:48 +00:00
Makefile.am * eio: make it compile on Windows. Thanks Vincent ! 2010-09-07 15:47:11 +00:00
eio_file.c * eio: add eio_file_move (completly asynchronous and non 2010-09-28 09:05:51 +00:00
eio_main.c * eio: oops, forgot to add those files. 2010-09-01 08:23:15 +00:00
eio_private.h * eio: add eio_file_move (completly asynchronous and non 2010-09-28 09:05:51 +00:00
eio_single.c * ecore: rename ecore_long_run to ecore_thread_feedback_run. 2010-09-22 09:47:55 +00:00