Top |
Truncation of files is used to force them to a particular length. If a file longer than specified, the trailing bytes are discarded, if it is shorter than specified it is padded with zeros.
GnomeVFSResult gnome_vfs_truncate (const gchar *text_uri
,GnomeVFSFileSize length
);
Truncate the file at text_uri
to length
bytes.
GnomeVFSResult gnome_vfs_truncate_uri (GnomeVFSURI *uri
,GnomeVFSFileSize length
);
Truncate the file at uri
to be only length
bytes. Data past length
bytes will be discarded.
GnomeVFSResult gnome_vfs_truncate_handle (GnomeVFSHandle *handle
,GnomeVFSFileSize length
);
Truncate the file pointed to by handle
to be only length
bytes.
Data past length
bytes will be discarded.