# NAND Archives

## Overview

This chapter describes the NAND Archive that is prepared by default in the file system.

## Specifications

Basic NAND archive operations are shown below.

- Uses the system-reserved archive names `shared1` and `photo`.
- Mounted automatically the first time the `FS_InitFatDriver` function is called.
  The types and number of NAND archives that are mounted are determined by the system launcher based on the settings in the RSF file, and are decided on during a boot.
- Because any file or directory can be created or deleted, this does not support commands that require file IDs or directory IDs. (`FS_RESULT_UNSUPPORTED` will be returned if such functions are called.)
- If either the buffer address or the transfer size is not aligned to a 32-byte boundary, the asynchronous read/write functions behave like the synchronous versions of the functions if called. When this is the case, processing performance declines because data is sent via a temporary buffer inside the library.

## Implementation

Because the memory space within NAND is not in NitroROM format, the internal implementation of archives does not use the sort of procedure mechanism used for ROM archives. As a result, it supports several new functions that did not exist in NITRO-SDK. On the other hand, it does not support several existing functions. The FS functions that can be used with NAND archives are shown below.

Usable Function
Unusable Function

Functions | Comments
FS_OpenFileEx (FS_OpenFile) |
FS_OpenFileFast | Commands that use file IDs are not supported.
FS_ConvertPathToFileID
FS_CloseFile |
FS_OpenFileDirect | Commands that directly access a device's address space are not supported.
FS_GetFileImageTop
FS_GetFileImageBottom
FS_GetFileLength |
FS_SetFileLength |
FS_GetFilePosition |
FS_SeekFile FS_SeekFileToBegin FS_SeekFileToEnd |
FS_ReadFile |
FS_ReadFileAsync |
FS_WriteFile |
FS_WriteFileAsync |
FS_FlushFile |
FS_OpenDirectory (FS_FindDir) |
FS_ReadDirectory (FS_ReadDir) |
FS_CloseDirectory |
FS_TellDir | Commands that use directory IDs are not supported.
FS_SeekDir
FS_RewindDir
FS_GetPathName | Commands that search through handles for a path name are not supported.
FS_GetPathLength
FS_CreateFile |
FS_DeleteFile |
FS_RenameFile |
FS_CreateDirectory |
FS_DeleteDirectory |
FS_RenameDirectory |

## See Also

`FS_Init`

## Revision History

2009/02/27 Corrected the text regarding the behavior of asynchronous functions.
2008/07/14 Made slight revision to text regarding archive name.
2007/09/18 Initial version.

CONFIDENTIAL