2 * ROX-Filer, filer for the ROX desktop project
3 * Thomas Leonard, <tal197@users.sourceforge.net>
10 #include <sys/types.h>
12 extern time_t diritem_recent_time
;
16 ITEM_FLAG_SYMLINK
= 0x01, /* Is a symlink */
17 ITEM_FLAG_APPDIR
= 0x02, /* Contains an AppRun */
18 ITEM_FLAG_MOUNT_POINT
= 0x04, /* Is mounted or in fstab */
19 ITEM_FLAG_MOUNTED
= 0x08, /* Is mounted */
20 ITEM_FLAG_EXEC_FILE
= 0x20, /* File, and has an X bit set (or is a .desktop)*/
21 ITEM_FLAG_MAY_DELETE
= 0x40, /* Delete on finishing scan */
22 ITEM_FLAG_RECENT
= 0x80, /* [MC]-time is around now */
24 /* DirItems are created with this flag set. Restatting or queuing an
25 * item in this state clears the flag. This is to prevent an item
26 * being added to the queue more than once at a time.
28 ITEM_FLAG_NEED_RESCAN_QUEUE
= 0x100,
30 ITEM_FLAG_HAS_XATTR
= 0x200, /* Has extended attributes set */
36 CollateKey
*leafname_collate
; /* Preprocessed for sorting */
37 gboolean may_delete
; /* Not yet found, this scan */
42 time_t atime
, ctime
, mtime
;
43 MaskedPixmap
*_image
; /* NULL => leafname only so far */
47 int lstat_errno
; /* 0 if details are valid */
50 void diritem_init(void);
51 DirItem
*diritem_new(const guchar
*leafname
);
52 void diritem_restat(const guchar
*path
, DirItem
*item
, struct stat
*parent
);
53 void _diritem_get_image(DirItem
*item
);
54 void diritem_free(DirItem
*item
);
56 static inline MaskedPixmap
*di_image(DirItem
*item
)
58 if (!item
->_image
&& item
->base_type
!= TYPE_UNKNOWN
)
59 _diritem_get_image(item
);
63 #endif /* _DIRITEM_H */