~ubuntu-branches/ubuntu/utopic/gettext/utopic

« back to all changes in this revision

Viewing changes to gettext-tools/gnulib-lib/clean-temp.h

  • Committer: Colin Watson
  • Date: 2010-08-01 21:36:08 UTC
  • mfrom: (2.1.10 sid)
  • Revision ID: cjwatson@canonical.com-20100801213608-yy7vkm8lpatep3ci
merge from Debian 0.18.1.1-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Temporary directories and temporary files with automatic cleanup.
2
 
   Copyright (C) 2006 Free Software Foundation, Inc.
 
2
   Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
3
3
   Written by Bruno Haible <bruno@clisp.org>, 2006.
4
4
 
5
5
   This program is free software: you can redistribute it and/or modify
60
60
   Return a fresh 'struct temp_dir' on success.  Upon error, an error message
61
61
   is shown and NULL is returned.  */
62
62
extern struct temp_dir * create_temp_dir (const char *prefix,
63
 
                                          const char *parentdir,
64
 
                                          bool cleanup_verbose);
 
63
                                          const char *parentdir,
 
64
                                          bool cleanup_verbose);
65
65
 
66
66
/* Register the given ABSOLUTE_FILE_NAME as being a file inside DIR, that
67
67
   needs to be removed before DIR can be removed.
68
68
   Should be called before the file ABSOLUTE_FILE_NAME is created.  */
69
69
extern void register_temp_file (struct temp_dir *dir,
70
 
                                const char *absolute_file_name);
 
70
                                const char *absolute_file_name);
71
71
 
72
72
/* Unregister the given ABSOLUTE_FILE_NAME as being a file inside DIR, that
73
73
   needs to be removed before DIR can be removed.
74
74
   Should be called when the file ABSOLUTE_FILE_NAME could not be created.  */
75
75
extern void unregister_temp_file (struct temp_dir *dir,
76
 
                                  const char *absolute_file_name);
 
76
                                  const char *absolute_file_name);
77
77
 
78
78
/* Register the given ABSOLUTE_DIR_NAME as being a subdirectory inside DIR,
79
79
   that needs to be removed before DIR can be removed.
80
80
   Should be called before the subdirectory ABSOLUTE_DIR_NAME is created.  */
81
81
extern void register_temp_subdir (struct temp_dir *dir,
82
 
                                  const char *absolute_dir_name);
 
82
                                  const char *absolute_dir_name);
83
83
 
84
84
/* Unregister the given ABSOLUTE_DIR_NAME as being a subdirectory inside DIR,
85
85
   that needs to be removed before DIR can be removed.
86
86
   Should be called when the subdirectory ABSOLUTE_DIR_NAME could not be
87
87
   created.  */
88
88
extern void unregister_temp_subdir (struct temp_dir *dir,
89
 
                                    const char *absolute_dir_name);
 
89
                                    const char *absolute_dir_name);
90
90
 
91
91
/* Remove the given ABSOLUTE_FILE_NAME and unregister it.
92
92
   Return 0 upon success, or -1 if there was some problem.  */
93
93
extern int cleanup_temp_file (struct temp_dir *dir,
94
 
                              const char *absolute_file_name);
 
94
                              const char *absolute_file_name);
95
95
 
96
96
/* Remove the given ABSOLUTE_DIR_NAME and unregister it.
97
97
   Return 0 upon success, or -1 if there was some problem.  */
98
98
extern int cleanup_temp_subdir (struct temp_dir *dir,
99
 
                                const char *absolute_dir_name);
 
99
                                const char *absolute_dir_name);
100
100
 
101
101
/* Remove all registered files and subdirectories inside DIR.
102
102
   Return 0 upon success, or -1 if there was some problem.  */