Lines Matching defs:statbuf
119 _g_local_file_info_create_etag (GLocalFileStat *statbuf)
123 tv.tv_sec = statbuf->st_mtime;
125 tv.tv_usec = statbuf->st_mtimensec / 1000;
127 tv.tv_usec = statbuf->st_mtim.tv_nsec / 1000;
136 _g_local_file_info_create_file_id (GLocalFileStat *statbuf)
139 (guint64) statbuf->st_dev,
140 (guint64) statbuf->st_ino);
144 _g_local_file_info_create_fs_id (GLocalFileStat *statbuf)
147 (guint64) statbuf->st_dev);
792 struct stat statbuf;
812 res = g_stat (dir, &statbuf);
822 parent_info->is_sticky = (statbuf.st_mode & S_ISVTX) != 0;
826 parent_info->owner = statbuf.st_uid;
827 parent_info->device = statbuf.st_dev;
831 parent_info->has_trash_dir = _g_local_file_has_trash_dir (dir, statbuf.st_dev);
840 GLocalFileStat *statbuf,
872 if (uid == statbuf->st_uid ||
898 GLocalFileStat *statbuf,
905 if (S_ISREG (statbuf->st_mode))
907 else if (S_ISDIR (statbuf->st_mode))
910 else if (S_ISCHR (statbuf->st_mode) ||
911 S_ISBLK (statbuf->st_mode) ||
912 S_ISFIFO (statbuf->st_mode)
914 || S_ISSOCK (statbuf->st_mode)
920 else if (S_ISLNK (statbuf->st_mode))
925 g_file_info_set_size (info, statbuf->st_size);
927 g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_UNIX_DEVICE, statbuf->st_dev);
930 g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_UNIX_INODE, statbuf->st_ino);
931 g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_UNIX_NLINK, statbuf->st_nlink);
932 g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_UNIX_UID, statbuf->st_uid);
933 g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_UNIX_GID, statbuf->st_gid);
934 g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_UNIX_RDEV, statbuf->st_rdev);
937 g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_UNIX_MODE, statbuf->st_mode);
939 g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE, statbuf->st_blksize);
942 g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_UNIX_BLOCKS, statbuf->st_blocks);
944 statbuf->st_blocks * G_GUINT64_CONSTANT (512));
947 g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_MODIFIED, statbuf->st_mtime);
949 g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC, statbuf->st_mtimensec / 1000);
951 g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC, statbuf->st_mtim.tv_nsec / 1000);
954 g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_ACCESS, statbuf->st_atime);
956 g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_TIME_ACCESS_USEC, statbuf->st_atimensec / 1000);
958 g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_TIME_ACCESS_USEC, statbuf->st_atim.tv_nsec / 1000);
961 g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_CHANGED, statbuf->st_ctime);
963 g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_TIME_CHANGED_USEC, statbuf->st_ctimensec / 1000);
965 g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_TIME_CHANGED_USEC, statbuf->st_ctim.tv_nsec / 1000);
971 char *etag = _g_local_file_info_create_etag (statbuf);
979 char *id = _g_local_file_info_create_file_id (statbuf);
987 char *id = _g_local_file_info_create_fs_id (statbuf);
1202 GLocalFileStat *statbuf,
1211 else if (S_ISDIR(statbuf->st_mode))
1214 else if (S_ISCHR(statbuf->st_mode))
1216 else if (S_ISBLK(statbuf->st_mode))
1218 else if (S_ISFIFO(statbuf->st_mode))
1222 else if (S_ISSOCK(statbuf->st_mode))
1411 GLocalFileStat statbuf;
1433 res = g_lstat (path, &statbuf);
1452 res = _wstati64 (wpath, &statbuf);
1473 is_symlink = S_ISLNK (statbuf.st_mode);
1490 statbuf = statbuf2;
1497 set_info_from_stat (info, &statbuf, attribute_matcher);
1504 S_ISREG (statbuf.st_mode))
1567 char *content_type = get_content_type (basename, path, &statbuf, is_symlink, symlink_broken, flags, FALSE);
1589 if (S_ISDIR (statbuf.st_mode))
1610 char *content_type = get_content_type (basename, path, &statbuf, is_symlink, symlink_broken, flags, TRUE);
1627 name = get_username_from_uid (statbuf.st_uid);
1641 name = get_realname_from_uid (statbuf.st_uid);
1655 name = get_groupname_from_gid (statbuf.st_gid);
1664 statbuf.st_dev != parent_info->device)
1667 get_access_rights (attribute_matcher, info, path, &statbuf, parent_info);
1898 struct stat statbuf;
1910 if (g_lstat (filename, &statbuf))
1921 if (!S_ISLNK (statbuf.st_mode))
1958 struct stat *statbuf,
1966 res = g_stat (filename, statbuf);
1986 struct stat statbuf;
1999 if (lazy_stat (filename, &statbuf, &got_stat) == 0)
2001 times[0].tv_sec = statbuf.st_mtime;
2003 times[0].tv_usec = statbuf.st_atimensec / 1000;
2005 times[0].tv_usec = statbuf.st_atim.tv_nsec / 1000;
2026 if (lazy_stat (filename, &statbuf, &got_stat) == 0)
2028 times[1].tv_sec = statbuf.st_mtime;
2030 times[1].tv_usec = statbuf.st_mtimensec / 1000;
2032 times[1].tv_usec = statbuf.st_mtim.tv_nsec / 1000;