diff options
author | Daniel Stenberg <daniel@haxx.se> | 2003-01-17 16:50:36 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2003-01-17 16:50:36 +0000 |
commit | 8c5e3f833b8d0f92c46679077acd755ed6075e05 (patch) | |
tree | fd0111fbff73d788f2a552eec2e37529dc2c5fb3 /uisimulator/win32/io.c | |
parent | 37b0c075cf8007b6bece5e8eaaf9bfa4756273f1 (diff) | |
download | rockbox-8c5e3f833b8d0f92c46679077acd755ed6075e05.tar.gz rockbox-8c5e3f833b8d0f92c46679077acd755ed6075e05.zip |
added stub functions for the rename
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3126 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/win32/io.c')
-rw-r--r-- | uisimulator/win32/io.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/uisimulator/win32/io.c b/uisimulator/win32/io.c new file mode 100644 index 0000000000..974fdadbbd --- /dev/null +++ b/uisimulator/win32/io.c | |||
@@ -0,0 +1,38 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2002 Daniel Stenberg | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | #include "file.h" | ||
21 | #include "debug.h" | ||
22 | |||
23 | #define SIMULATOR_ARCHOS_ROOT "archos" | ||
24 | |||
25 | int win32_rename(char *oldpath, char* newpath) | ||
26 | { | ||
27 | char buffer1[256]; | ||
28 | char buffer2[256]; | ||
29 | |||
30 | if(oldpath[0] == '/') { | ||
31 | sprintf(buffer1, "%s%s", SIMULATOR_ARCHOS_ROOT, oldpath); | ||
32 | sprintf(buffer2, "%s%s", SIMULATOR_ARCHOS_ROOT, newpath); | ||
33 | |||
34 | debugf("We rename the real file '%s' to '%s'\n", buffer1, buffer2); | ||
35 | return rename(buffer1, buffer2); | ||
36 | } | ||
37 | return -1; | ||
38 | } | ||