Enlightenment CVS committal

Author  : chaos
Project : e17
Module  : apps/evfs

Dir     : e17/apps/evfs/src/common


Modified Files:
        evfs_filereference.c 


Log Message:
* Misc/EvfsStat

===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/common/evfs_filereference.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- evfs_filereference.c        19 Aug 2007 01:30:08 -0000      1.3
+++ evfs_filereference.c        20 Aug 2007 11:08:17 -0000      1.4
@@ -19,3 +19,38 @@
        EvfsFilereference* ref = evfs_filereference_new("file", path, 0);
        return ref;
 }
+
+void evfs_filereference_stat_to_system(EvfsFilereference* file, struct stat* 
st) 
+{
+       /*Yes - ugly.  But the sizes are different, to accomodate all
+        * systems*/
+       if (file->stat) {
+               st->st_mode = file->stat->st_mode;
+               st->st_uid = file->stat->st_uid;
+               st->st_gid = file->stat->st_gid;
+               st->st_size = file->stat->st_size;
+               st->st_atime = file->stat->ist_atime;
+               st->st_ctime = file->stat->ist_ctime;
+               st->st_mtime = file->stat->ist_mtime;
+
+       }
+}
+
+void evfs_stat_system_to_evfs_filereference(EvfsFilereference* file, struct 
stat* st) 
+{
+       /*Yes - ugly.  But the sizes are different, to accomodate all
+        * systems*/
+       if (file->stat) {
+               free(file->stat);
+       }
+       file->stat = NEW(EvfsStat);
+
+       file->stat->st_mode = st->st_mode;
+       file->stat->st_uid = st->st_uid;
+       file->stat->st_gid = st->st_gid;
+       file->stat->st_size = st->st_size;
+       file->stat->ist_atime = st->st_atime;
+       file->stat->ist_ctime = st->st_ctime;
+       file->stat->ist_mtime = st->st_mtime;
+
+}



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to