@@ -69,51 +69,6 @@ LibraryManager.library = {
6969 return cString ;
7070 } ,
7171
72- // ==========================================================================
73- // utime.h
74- // ==========================================================================
75-
76- #if FILESYSTEM
77- $setFileTime__deps : [ '$FS' , '$setErrNo' ] ,
78- $setFileTime : function ( path , time ) {
79- path = UTF8ToString ( path ) ;
80- try {
81- FS . utime ( path , time , time ) ;
82- return 0 ;
83- } catch ( e ) {
84- if ( ! ( e instanceof FS . ErrnoError ) ) throw e + ' : ' + stackTrace ( ) ;
85- setErrNo ( e . errno ) ;
86- return - 1 ;
87- }
88- } ,
89- #else
90- $setFileTime__deps : [ '$setErrNo' ] ,
91- $setFileTime : function ( path , time ) {
92- // No filesystem support; return an error as if the file does not exist
93- // (which it almost certainly does not, except for standard streams).
94- setErrNo ( { { { cDefine ( 'ENOENT' ) } } } ) ;
95- return - 1 ;
96- } ,
97- #endif
98-
99- utimes__deps : [ '$setFileTime' ] ,
100- utimes__proxy : 'sync' ,
101- utimes__sig : 'iii' ,
102- utimes : function ( path , times ) {
103- // utimes is just like utime but take an array of 2 times: `struct timeval times[2]`
104- // times[0] is the new access time (which we currently ignore)
105- // times[1] is the new modification time.
106- var time ;
107- if ( times ) {
108- var mtime = times + { { { C_STRUCTS . timeval . __size__ } } } ;
109- time = { { { makeGetValue ( 'mtime' , C_STRUCTS . timeval . tv_sec , 'i32' ) } } } * 1000 ;
110- time += { { { makeGetValue ( 'mtime' , C_STRUCTS . timeval . tv_usec , 'i32' ) } } } / 1 0 0 0 ;
111- } else {
112- time = Date . now ( ) ;
113- }
114- return setFileTime ( path , time ) ;
115- } ,
116-
11772 exit__sig : 'vi' ,
11873#if MINIMAL_RUNTIME
11974 // minimal runtime doesn't do any exit cleanup handling so just
0 commit comments