- Main Page
- Modules
- Data Structures
- Files
- Related Pages

# Use setcwd
[Examples]

You can use a text path (ASCII or UNICODE) to access a file or path.
nav_setcwd() allow following string :

- "name.txt" to search a file or directory in current directory
- "nam*" to search the first file or directory corresponding in current directory
- '\' '/' is egal and supported
- "name\" to search a directory in current directory and enter in directory
- "name\name2.txt" to search a path in current directory
- "\name\name2.txt" to search a path in root directory
- "./" is supported at beginning but it is not mandatory
- "../../" is supported at beginning
- "A:\" is supported at beginning, 'A' corresponding at disk 0

    Bool search_path( void )
    {
       const _MEM_TYPE_SLOW_ U8 path[]="dir1/file.txt";

       nav_select(0);                         // Choose a free navigator

       // Select a disk and mount it
       nav_drive_set(1);
       nav_partition_mount();
       // HERE the navigator is in root dir

    #if( (FS_ASCII == ENABLED) && (FS_UNICODE == ENABLED) )
       nav_string_ascii();  // Select a ASCII name format
    #endif

       if( !nav_setcwd( (FS_STRING)path , TRUE, FALSE ) )   // search file "dir1/file.txt" in root dir of disk 1
          return FALSE;
    }