File: test-file-manager.c

package info (click to toggle)
libdazzle 3.44.0-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 4,964 kB
  • sloc: ansic: 64,328; xml: 69; javascript: 19; makefile: 12
file content (24 lines) | stat: -rw-r--r-- 459 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <dazzle.h>
#include <stdlib.h>

int main (int argc, char *argv[])
{
  g_autoptr(GFile) file = NULL;
  g_autoptr(GError) error = NULL;

  if (argc == 1)
    {
      g_printerr ("usage: %s FILENAME\n", argv[0]);
      return EXIT_FAILURE;
    }

  file = g_file_new_for_commandline_arg (argv [1]);

  if (!dzl_file_manager_show (file, &error))
    {
      g_printerr ("%s\n", error->message);
      return EXIT_FAILURE;
    }

  return EXIT_SUCCESS;
}