[Freeswitch-svn] [commit] r5033 - in freeswitch/trunk/src: . include
Freeswitch SVN
mikej at freeswitch.org
Sat Apr 28 15:00:57 EDT 2007
Author: mikej
Date: Sat Apr 28 15:00:57 2007
New Revision: 5033
Modified:
freeswitch/trunk/src/include/switch_apr.h
freeswitch/trunk/src/switch_apr.c
Log:
wrap some other bits for use in the near future.
Modified: freeswitch/trunk/src/include/switch_apr.h
==============================================================================
--- freeswitch/trunk/src/include/switch_apr.h (original)
+++ freeswitch/trunk/src/include/switch_apr.h Sat Apr 28 15:00:57 2007
@@ -733,6 +733,10 @@
*/
SWITCH_DECLARE(switch_status_t) switch_file_write(switch_file_t * thefile, const void *buf, switch_size_t *nbytes);
+SWITCH_DECLARE(switch_status_t) switch_file_mktemp(switch_file_t **thefile, char *templ, int32_t flags, switch_memory_pool_t *pool);
+
+SWITCH_DECLARE(switch_size_t) switch_file_get_size(switch_file_t *thefile);
+
SWITCH_DECLARE(switch_status_t) switch_file_exists(const char *filename, switch_memory_pool_t *pool);
/** @} */
Modified: freeswitch/trunk/src/switch_apr.c
==============================================================================
--- freeswitch/trunk/src/switch_apr.c (original)
+++ freeswitch/trunk/src/switch_apr.c Sat Apr 28 15:00:57 2007
@@ -335,6 +335,17 @@
return apr_file_write(thefile, buf, nbytes);
}
+SWITCH_DECLARE(switch_status_t) switch_file_mktemp(switch_file_t **thefile, char *templ, int32_t flags, switch_memory_pool_t *pool)
+{
+ return apr_file_mktemp(thefile, templ, flags, pool);
+}
+
+SWITCH_DECLARE(switch_size_t) switch_file_get_size(switch_file_t *thefile)
+{
+ struct apr_finfo_t finfo;
+ return apr_file_info_get(&finfo, APR_FINFO_SIZE, thefile) == SWITCH_STATUS_SUCCESS ? (switch_size_t)finfo.size : 0;
+}
+
SWITCH_DECLARE(switch_status_t) switch_file_exists(const char *filename, switch_memory_pool_t *pool)
{
int32_t wanted = APR_FINFO_TYPE;
More information about the Freeswitch-svn
mailing list