| MateVFS - Filesystem Abstraction library | ||||
|---|---|---|---|---|
| Top | Description | ||||
MateVFSResult mate_vfs_truncate (const gchar *text_uri,MateVFSFileSize length); MateVFSResult mate_vfs_truncate_uri (MateVFSURI *uri,MateVFSFileSize length); MateVFSResult mate_vfs_truncate_handle (MateVFSHandle *handle,MateVFSFileSize length);
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.
MateVFSResult mate_vfs_truncate (const gchar *text_uri,MateVFSFileSize length);
Truncate the file at text_uri to length bytes.
|
string representing the file to be truncated. |
|
length of the new file at text_uri.
|
Returns : |
an integer representing the result of the operation. |
MateVFSResult mate_vfs_truncate_uri (MateVFSURI *uri,MateVFSFileSize length);
Truncate the file at uri to be only length bytes. Data past length
bytes will be discarded.
|
uri of the file to be truncated. |
|
length of the new file at uri.
|
Returns : |
an integer representing the result of the operation. |
MateVFSResult mate_vfs_truncate_handle (MateVFSHandle *handle,MateVFSFileSize length);
Truncate the file pointed to by handle to be only length bytes.
Data past length bytes will be discarded.
|
a handle to the file to be truncated. |
|
length of the new file the handle is open to. |
Returns : |
an integer representing the result of the operation. |