*** empty log message ***
[coreutils.git] / src / remove.h
blobba04d6fabb7647318acdea11f25a46a4621dbec7
2 struct rm_options
4 /* If nonzero, ignore nonexistant files. */
5 int ignore_missing_files;
7 /* If nonzero, query the user about whether to remove each file. */
8 int interactive;
10 /* If nonzero, recursively remove directories. */
11 int recursive;
13 /* If nonzero, stdin is a tty. */
14 int stdin_tty;
16 /* If nonzero, remove directories with unlink instead of rmdir, and don't
17 require a directory to be empty before trying to unlink it.
18 Only works for the super-user. */
19 int unlink_dirs;
21 /* If nonzero, display the name of each file removed. */
22 int verbose;
25 enum RM_status
27 /* These must be listed in order of increasing seriousness. */
28 RM_OK = 1,
29 RM_USER_DECLINED,
30 RM_ERROR
33 #define VALID_STATUS(S) \
34 ((S) == RM_OK || (S) == RM_USER_DECLINED || (S) == RM_ERROR)
36 struct File_spec
38 char *filename;
39 unsigned int have_filetype_mode:1;
40 unsigned int have_full_mode:1;
41 mode_t mode;
42 ino_t inum;
45 enum RM_status rm PARAMS ((struct File_spec *fs, int user_specified_name,
46 const struct rm_options *x));
47 void fspec_init_file PARAMS ((struct File_spec *fs, const char *filename));
48 void remove_init PARAMS ((void));
49 void remove_fini PARAMS ((void));