Changes between Version 81 and Version 82 of library_stdio
- Timestamp:
- Jun 11, 2015, 7:55:55 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
library_stdio
v81 v82 181 181 WARNING: A node name (file or directory) cannot be larger than 30 characters. 182 182 183 Returns thefile descriptor index if success183 Returns file descriptor index if success 184 184 Returns -1 if error. 185 185 186 === 2) ''' voidgiet_fat_close'''( unsigned int fd_id ) ===186 === 2) '''int giet_fat_close'''( unsigned int fd_id ) === 187 187 Close a file identified by the ''fd_id'' file descriptor. 188 188 It decrements the reference count in the inode associated to the file, and release the fd_id entry in the file descriptors array. 189 189 If the reference count is zero, it writes all dirty clusters on block device, and releases the memory allocated to the file_cache. 190 190 191 === 3) '''void get_fat_file_info'''( unsigned int fd_id , unsigned int* size , unsigned int* offset ) === 191 Returns 0 if success. 192 Returns -1 if error. 193 194 === 3) '''int get_fat_file_info'''( unsigned int fd_id , unsigned int* size , unsigned int* offset ) === 192 195 This function returns the "size" and the current "offset" value for a file identified by the "fd_id" argument. 196 197 Returns 0 if success. 198 Returns -1 if error. 193 199 194 200 === 4) int '''giet_fat_read'''( unsigned int fd_id , void* buffer , unsigned int count ) === … … 207 213 Returns -1 if error. 208 214 209 === int '''giet_fat_lseek'''( unsigned int fd_id , unsigned int offset , unsigned int whence ) ===215 === 6) int '''giet_fat_lseek'''( unsigned int fd_id , unsigned int offset , unsigned int whence ) === 210 216 This function has the same semantic as the UNIX lseek() function. 211 217 It repositions the offset in the file descriptor "fd_id", according to the "offset" and "whence" arguments. … … 215 221 Returns -1 if error. 216 222 217 === int '''giet_fat_rm'''( char* pathname ) ===223 === 7) int '''giet_fat_rm'''( char* pathname ) === 218 224 This function has the same semantic as the UNIX unlink() function. 219 225 It deletes a file identified by the absolute "pathname" argument from the sile system. … … 227 233 Returns -1 if error. 228 234 229 === int '''get_fat_mkdir( char* pathname ) ===235 === 8) int '''get_fat_mkdir( char* pathname ) === 230 236 This function has the same semantic as the UNIX mkdir() function. 231 237 It creates in the file system the directory specified by the absolute "pathname" argument. … … 239 245 Returns -1 if error. 240 246 241 === void'''get_fat_rmdir'''( char* pathname ) ===247 === 9) int '''get_fat_rmdir'''( char* pathname ) === 242 248 This function has the same semantic as the UNIX mkdir() function. 243 249 It deletes the directory specified by the absolute "pathname" argument from the file system.