FS:RenameDirectory: Difference between revisions

From 3dbrew
Jump to navigation Jump to search
Steveice10 (talk | contribs)
TimmSkiller (talk | contribs)
Add notice for renaming across different archives
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Renames or moves a directory. The file is moved from the path srcDirLowPath in archive srcArchive to destDirLowPath in destArchive. ('''NOTE:''' Moving directories to different archives wasn't tested.)
=Request=
=Request=
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Index Word !! Description
! Index Word
! Description
|-
|-
| 0 || Header code [0x080A0244]
| 0
| Header code [0x080A0244]
|-
|-
| 1 || Transaction (usually 0)
| 1
| Transaction (usually 0)
|-
|-
| 2 || srcArchive.handleLow
| 2-3
| u64, Source Archive Handle
|-
|-
| 3 || srcArchive.handleHigh
| 4
| [[Filesystem_services#PathType|Source Directory Path Type]]
|-
|-
| 4 || srcDirLowPath.type
| 5
| Source Directory Path Size
|-
|-
| 5 || srcDirLowPath.size
| 6-7
| u64, Destination Archive Handle
|-
|-
| 6 || destArchive.handleLow
| 8
| [[Filesystem_services#PathType|Destination Directory Path Type]]
|-
|-
| 7 || destArchive.handleHigh
| 9
| Destination Directory Path Size
|-
|-
| 8 || destDirLowPath.type
| 10
| (SourceDirectoryPathSize << 14) <nowiki>|</nowiki> 0x402
|-
|-
| 9 || destDirLowPath.size
| 11
| Source Directory Path Data Pointer
|-
|-
| 10 || (srcDirLowPath.size << 14) <nowiki>|</nowiki> 0x402
| 12
| (DestinationDirectoryPathSize << 14) <nowiki>|</nowiki> 0x802
|-
|-
| 11 || srcDirLowPath.data
| 13
|-
| Destination Directory Path Data Pointer
| 12 || (destDirLowPath.size << 14) <nowiki>|</nowiki> 0x802
|-
| 13 || destDirLowPath.data
|}
|}


Line 38: Line 45:
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Index Word !! Description
! Index Word
! Description
|-
|-
| 0 || Header code
| 0
| Header code
|-
|-
| 1 || Resultcode
| 1
| Result code
|}
|}
=Description=
Renames or moves a directory. The file is moved from the path srcDirLowPath in archive srcArchive to destDirLowPath in destArchive. Renaming across different archives is not allowed, as listed below.


=Errors=
=Errors=
Line 55: Line 68:
|-
|-
| 0xC82044BE || When the destination directory already exists.
| 0xC82044BE || When the destination directory already exists.
|-
| 0xE0C046F8 || When the source archive and destination archive are not the same.
|}
|}

Latest revision as of 14:27, 5 June 2022

Request

Index Word Description
0 Header code [0x080A0244]
1 Transaction (usually 0)
2-3 u64, Source Archive Handle
4 Source Directory Path Type
5 Source Directory Path Size
6-7 u64, Destination Archive Handle
8 Destination Directory Path Type
9 Destination Directory Path Size
10 (SourceDirectoryPathSize << 14) | 0x402
11 Source Directory Path Data Pointer
12 (DestinationDirectoryPathSize << 14) | 0x802
13 Destination Directory Path Data Pointer

Response

Index Word Description
0 Header code
1 Result code

Description

Renames or moves a directory. The file is moved from the path srcDirLowPath in archive srcArchive to destDirLowPath in destArchive. Renaming across different archives is not allowed, as listed below.

Errors

Result code Description
0 Returned on success.
0xC8804478 When the source directory does not exist or is a file.
0xC82044BE When the destination directory already exists.
0xE0C046F8 When the source archive and destination archive are not the same.