Changeset 5320
- Timestamp:
- 02/28/08 08:13:31 (6 months ago)
- Files:
-
- libwired/trunk/libwired/file/wi-file.c (modified) (2 diffs)
- libwired/trunk/libwired/file/wi-file.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
libwired/trunk/libwired/file/wi-file.c
r5164 r5320 246 246 247 247 248 wi_boolean_t wi_file_symlink(wi_string_t *frompath, wi_string_t *topath) { 249 if(symlink(wi_string_cstring(frompath), wi_string_cstring(topath)) < 0) { 250 wi_error_set_errno(errno); 251 252 return false; 253 } 254 255 return true; 256 } 257 258 259 248 260 wi_boolean_t wi_file_copy(wi_string_t *frompath, wi_string_t *topath) { 249 261 struct stat sb; … … 381 393 382 394 395 wi_boolean_t wi_file_set_mode(wi_string_t *path, mode_t mode) { 396 if(chmod(wi_string_cstring(path), mode) < 0) { 397 wi_error_set_errno(errno); 398 399 return false; 400 } 401 402 return true; 403 } 404 405 406 383 407 wi_boolean_t wi_file_stat(wi_string_t *path, struct stat *sp) { 384 408 if(stat(wi_string_cstring(path), sp) < 0) { libwired/trunk/libwired/file/wi-file.h
r4656 r5320 75 75 WI_EXPORT wi_boolean_t wi_file_clear(wi_string_t *); 76 76 WI_EXPORT wi_boolean_t wi_file_rename(wi_string_t *, wi_string_t *); 77 WI_EXPORT wi_boolean_t wi_file_symlink(wi_string_t *, wi_string_t *); 77 78 WI_EXPORT wi_boolean_t wi_file_copy(wi_string_t *, wi_string_t *); 78 79 WI_EXPORT wi_boolean_t wi_file_stat(wi_string_t *, struct stat *); … … 81 82 WI_EXPORT wi_boolean_t wi_file_exists(wi_string_t *, wi_boolean_t *); 82 83 WI_EXPORT wi_boolean_t wi_file_create_directory(wi_string_t *, mode_t); 84 WI_EXPORT wi_boolean_t wi_file_set_mode(wi_string_t *, mode_t); 83 85 WI_EXPORT wi_boolean_t wi_file_is_alias(wi_string_t *); 84 86 WI_EXPORT wi_boolean_t wi_file_is_alias_cpath(const char *);
