コード例 #1
0
static MateVFSResult
do_truncate_handle (MateVFSMethod *method,
		    MateVFSMethodHandle *method_handle,
		    MateVFSFileSize where,
		    MateVFSContext *context)
{
	PERFORM_OPERATION_NO_URI (truncate_handle, mate_vfs_truncate_handle_cancellable ((MateVFSHandle *) method_handle, where, context));
}
コード例 #2
0
ファイル: mate-vfs-ops.c プロジェクト: fatman2021/mate-vfs
/**
 * mate_vfs_truncate_handle:
 * @handle: a handle to the file to be truncated.
 * @length: length of the new file the handle is open to.
 * 
 * Truncate the file pointed to by @handle to be only @length bytes. 
 * Data past @length bytes will be discarded.
 * 
 * Return value: an integer representing the result of the operation.
 */
MateVFSResult
mate_vfs_truncate_handle (MateVFSHandle *handle, MateVFSFileSize length)
{
	return mate_vfs_truncate_handle_cancellable(handle, length, NULL);
}