summaryrefslogtreecommitdiffstats
path: root/library/cpp/resource/README.md
blob: b271aacda4f4b3eced66034f31e6db056b31e30d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
This library provides implementation to access a resource (data, file, image, etc.) by a key.
=============================================================================================

See ya make documentation, resources section for more details.

### Example - adding a resource file into build:
```
LIBRARY()

RESOURCE(
    path/to/file1 /key/in/program/1
    path/to/file2 /key2
)
END()
```

### Example - access to a file content by a key:
```cpp
#include <library/cpp/resource/resource.h>
int main() {
    Cout << NResource::Find("/key/in/program/1") << Endl;
    Cout << NResource::Find("/key2") << Endl;
}
```