1e41f4b71Sopenharmony_ci# File Organization 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci 4e41f4b71Sopenharmony_ci## Directory Structure 5e41f4b71Sopenharmony_ci 6e41f4b71Sopenharmony_ciThe following figure shows the typical directory structure of the JavaScript module (**entry/src/main/js/module**) for an application with feature abilities (FA) using JavaScript APIs. 7e41f4b71Sopenharmony_ci 8e41f4b71Sopenharmony_ci **Figure 1** Directory structure 9e41f4b71Sopenharmony_ci 10e41f4b71Sopenharmony_ci 11e41f4b71Sopenharmony_ci 12e41f4b71Sopenharmony_ciFunctions of the files are as follows: 13e41f4b71Sopenharmony_ci 14e41f4b71Sopenharmony_ci- **.hml** files describe the page layout. 15e41f4b71Sopenharmony_ci 16e41f4b71Sopenharmony_ci- **.css** files describe the page style. 17e41f4b71Sopenharmony_ci 18e41f4b71Sopenharmony_ci- **.js** files process the interactions between pages and users. 19e41f4b71Sopenharmony_ci 20e41f4b71Sopenharmony_ciFunctions of the folders are as follows: 21e41f4b71Sopenharmony_ci 22e41f4b71Sopenharmony_ci- The **app.js** file manages global JS logics and application lifecycle. 23e41f4b71Sopenharmony_ci- The **pages** directory stores all component pages. 24e41f4b71Sopenharmony_ci- The **common** directory stores public resource files, such as media resources and **.js** files. 25e41f4b71Sopenharmony_ci- The **i18n** folder stores resources in different languages, for example, UI strings and image paths. 26e41f4b71Sopenharmony_ci 27e41f4b71Sopenharmony_ci> **NOTE** 28e41f4b71Sopenharmony_ci> 29e41f4b71Sopenharmony_ci> - The **i18n** folder is a reserved one and cannot be renamed. 30e41f4b71Sopenharmony_ci> 31e41f4b71Sopenharmony_ci> 32e41f4b71Sopenharmony_ci> - The folders marked as optional in the directory structure can be created as needed after you create the project in DevEco Studio. 33e41f4b71Sopenharmony_ci 34e41f4b71Sopenharmony_ci 35e41f4b71Sopenharmony_ci## File Access Rules 36e41f4b71Sopenharmony_ci 37e41f4b71Sopenharmony_ciApplication resources can be accessed via an absolute or relative path. In this development framework, an absolute path starts with a slash (/), and a relative path starts with **./** or **../**. The rules are as follows: 38e41f4b71Sopenharmony_ci 39e41f4b71Sopenharmony_ci- To reference a code file, use a relative path, for example, **../common/utils.js**. 40e41f4b71Sopenharmony_ci 41e41f4b71Sopenharmony_ci- To reference a resource file, use an absolute path, for example: **/common/xxx.png**. 42e41f4b71Sopenharmony_ci 43e41f4b71Sopenharmony_ci- Store code files and resource files in the **common** directory and access the files in a required fashion. 44e41f4b71Sopenharmony_ci 45e41f4b71Sopenharmony_ci- In a **.css** file, use the **url()** function to create a URL, for example, **url(/common/xxx.png)**. 46e41f4b71Sopenharmony_ci 47e41f4b71Sopenharmony_ci> **NOTE** 48e41f4b71Sopenharmony_ci> 49e41f4b71Sopenharmony_ci> When code file A needs to reference code file B: 50e41f4b71Sopenharmony_ci> 51e41f4b71Sopenharmony_ci> - If code files A and B are in the same directory, you can use either a relative or absolute path in code file B to reference resource files. 52e41f4b71Sopenharmony_ci> 53e41f4b71Sopenharmony_ci> - If code files A and B are in different directories, you must use an absolute path in code file B to reference resource files, because the directory of code file B changes during Webpack packaging. 54e41f4b71Sopenharmony_ci> 55e41f4b71Sopenharmony_ci 56e41f4b71Sopenharmony_ci 57e41f4b71Sopenharmony_ci## Media File Formats 58e41f4b71Sopenharmony_ci 59e41f4b71Sopenharmony_ci **Table 1** Supported image formats 60e41f4b71Sopenharmony_ci 61e41f4b71Sopenharmony_ci| Format | Supported Version | File Name Extension| 62e41f4b71Sopenharmony_ci| ---- | ------------------------ | ------- | 63e41f4b71Sopenharmony_ci| BMP | API version 4+ | .bmp | 64e41f4b71Sopenharmony_ci| JPEG | API version 4+ | .jpg | 65e41f4b71Sopenharmony_ci| PNG | API version 4+ | .png | 66e41f4b71Sopenharmony_ci 67e41f4b71Sopenharmony_ci## Storage Directory 68e41f4b71Sopenharmony_ci 69e41f4b71Sopenharmony_ciSince API version 5, the [\<image>](js-lite-components-basic-image.md) component supports access to images in the private directory of an application. 70e41f4b71Sopenharmony_ci 71e41f4b71Sopenharmony_ci| Directory Type | Prefix | Access Visibility | Description | 72e41f4b71Sopenharmony_ci| ------ | --------------- | ------ | --------------------------- | 73e41f4b71Sopenharmony_ci| Private directory of the application| internal://app/ | Current application only| The directory is deleted when the application is uninstalled. Access to the parent directory using **../** is prohibited.| 74