Bug 505042 – add file attribute for actually used file size in bytes

2009-02-13  Ryan Lortie  <desrt@desrt.ca>

	Bug 505042 – add file attribute for actually used file size in bytes

	* gfileinfo.h: add G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE define to
	"standard::allocated-size"
	* gfileattribute.c: document
	* glocalfileinfo.c: set the allocated size from st_blocks * 512


svn path=/trunk/; revision=7865
This commit is contained in:
Ryan Lortie
2009-02-16 14:22:43 +00:00
committed by Alexander Larsson
parent 2bd1d5d737
commit e8c635841a
4 changed files with 24 additions and 0 deletions

View File

@@ -191,6 +191,18 @@ typedef struct _GFileInfoClass GFileInfoClass;
**/
#define G_FILE_ATTRIBUTE_STANDARD_SIZE "standard::size" /* uint64 */
/**
* G_FILE_ATTRIBUTE_ALLOCATED_SIZE:
*
* A key in the "standard" namespace for getting the amount of disk space
* that is consumed by the file (in bytes). This will generally be larger
* than the file size (due to block size overhead) but can occasionally be
* smaller (for example, for sparse files).
*
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
**/
#define G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE "standard::allocated-size" /* uint64 */
/**
* G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET:
*