Skip to content

Commit 9e2dee5

Browse files
committed
update console/file-system/fps-meter
1 parent a66bd2b commit 9e2dee5

32 files changed

+247
-223
lines changed

app/ns-framework-modules-category/console/console-page.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
const ListViewLinksModel = require("../../links-view-model");
22
const link = require("../../link");
33
const navigationLinks = [
4-
new link("Basics", "ns-framework-modules-category/console/basics/basics-page")
4+
new link("Usage", "ns-framework-modules-category/console/usage/usage-page")
55
];
66
const navigationLinksTsc = [
7-
new link("Basics", "ns-framework-modules-category/console/basics/basics-ts-page")
7+
new link("Usage", "ns-framework-modules-category/console/usage/usage-ts-page")
88
];
99
function onNavigatingTo(args) {
1010
const page = args.object;

app/ns-framework-modules-category/console/basics/article.md renamed to app/ns-framework-modules-category/console/usage/article.md

File renamed without changes.

app/ns-framework-modules-category/console/basics/basics-page.js renamed to app/ns-framework-modules-category/console/usage/usage-page.js

File renamed without changes.

app/ns-framework-modules-category/console/basics/basics-page.xml renamed to app/ns-framework-modules-category/console/usage/usage-page.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Page xmlns="http://www.nativescript.org/tns.xsd" navigatedTo="onNavigatedTo">
22
<Page.actionBar>
3-
<ActionBar title="Basics"/>
3+
<ActionBar title="Usage"/>
44
</Page.actionBar>
55
<StackLayout verticalAlignment="middle" class="page">
66
<Label text="This concept of the example is demonstrated in the code-behind!" textWrap="true" class="h3 text-center"/>

app/ns-framework-modules-category/console/basics/basics-ts-page.ts renamed to app/ns-framework-modules-category/console/usage/usage-ts-page.ts

File renamed without changes.

app/ns-framework-modules-category/console/basics/basics-ts-page.xml renamed to app/ns-framework-modules-category/console/usage/usage-ts-page.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Page xmlns="http://www.nativescript.org/tns.xsd" navigatedTo="onNavigatedTo">
22
<Page.actionBar>
3-
<ActionBar title="Basics"/>
3+
<ActionBar title="Usage"/>
44
</Page.actionBar>
55
<StackLayout verticalAlignment="middle" class="page">
66
<Label text="This concept of the example is demonstrated in the code-behind!" textWrap="true" class="h3 text-center"/>

app/ns-framework-modules-category/file-system/create/article.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

app/ns-framework-modules-category/file-system/delete/article.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

app/ns-framework-modules-category/file-system/end.md

Lines changed: 79 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,83 @@
1+
## File Properties
12

2-
**API Reference for the** [File System Module](https://docs.nativescript.org/api-reference/modules/_file_system_.html)
3+
| Name | Type | Description |
4+
|----------|---------|----------------|
5+
| `extension` | `string` | Gets the extension of the file. |
6+
| `isLocked` | `boolean` | Gets a value indicating whether the file is currently locked, meaning a background operation associated with this file is running. |
7+
| `lastModified` | `Date` | Gets the Date object specifying the last time this entity was modified. |
8+
| `name` | `string` | Gets the name of the entity. |
9+
| `parent` | `Folder` | Gets the Folder object representing the parent of this entity. Will be null for a root folder like Documents or Temporary. This property is readonly. |
10+
| `path` | `string` | Gets the fully-qualified path (including the extension for a File) of the entity.|
11+
| `size` | `number` | Gets the size in bytes of the file. |
312

4-
**API Reference for the** [File Class](https://docs.nativescript.org/api-reference/classes/_file_system_.file.html)
13+
## File Methods
514

6-
**API Reference for the** [FileSystemEntity Class](https://docs.nativescript.org/api-reference/classes/_file_system_.filesystementity.html)
15+
| Name | Return Type | Description |
16+
|----------|---------|----------------|
17+
| `read` | `Promise<any>` | Reads the binary content of the file asynchronously. |
18+
| `readSync(onError?: function)` | `any` | Reads the binary content of the file synchronously. |
19+
| `readText(encoding?: string)` | `Promise<string>` | Reads the content of the file as a string using the specified encoding (defaults to UTF-8). |
20+
| `readTextSync(onError?: function, encoding?: string)` | `string` | Reads the content of the file as a string synchronously, using the specified encoding (defaults to UTF-8). |
21+
| `remove` | `void` | Removes (deletes) the current Entity from the file system. |
22+
| `removeSync(onError?: function)` | `void` | Removes (deletes) the current Entity from the file system synchronously.|
23+
| `rename(newName: string)` | `Promise<any>` | Renames the current entity using the specified name. |
24+
| `renameSync(newName: string, onError?: function)` | `void` | Renames the current entity synchronously, using the specified name. |
25+
| `write(newName: string)` | `Promise<void>` | Writes the provided binary content to the file. |
26+
| `writeSync(newName: string, onError?: function)` | `void` | Writes the provided binary content to the file synchronously. |
27+
| `writeText(encoding?: string)` | `Promise<string>` | Writes the content of the file as a string using the specified encoding (defaults to UTF-8). |
28+
| `writeTextSync(onError?: function, encoding?: string)` | `string` | Writes the content of the file as a string synchronously, using the specified encoding (defaults to UTF-8). |
29+
| `exists(path: string)` | `boolean` | Checks whether a File with the specified path already exists. |
30+
| `fromPath(path: string)` | `File` | Gets or creates a File entity at the specified path. |
31+
32+
## Folder Properties
33+
34+
| Name | Type | Description |
35+
|----------|---------|----------------|
36+
| `isKnown` | `boolean` | Determines whether this instance is a KnownFolder (accessed through the KnownFolders object). |
37+
| `lastModified` | `Date` | Gets the Date object specifying the last time this entity was modified. |
38+
| `name` | `string` | Gets the name of the entity. |
39+
| `parent` | `Folder` | Gets the Folder object representing the parent of this entity. Will be null for a root folder like Documents or Temporary. This property is readonly. |
40+
| `path` | `string` | Gets the fully-qualified path (including the extension for a File) of the entity.|
41+
42+
## Folder Methods
43+
44+
| Name | Return Type | Description |
45+
|----------|---------|----------------|
46+
| `clear` | `Promise<any>` | Deletes all the files and folders (recursively), contained within this Folder. |
47+
| `clearSync(onError?: function)` | `void` | Deletes all the files and folders (recursively), contained within this Folder synchronously. |
48+
| `contains(name: string)` | `boolean` | Checks whether this Folder contains an Entity with the specified name. The path of the folder is added to the name to resolve the complete path to check for. |
49+
| `eachEntity(onEntity: function)` | `any` | Enumerates all the top-level FileSystem entities residing within this folder. |
50+
| `getEntities` | `Promise<Array<FileSystemEntity>>` | Gets all the top-level entities residing within this folder. |
51+
| `getEntitiesSync(onError?: function)` | `Array<FileSystemEntity>` | Gets all the top-level entities residing within this folder synchronously |
52+
| `getFile(name: string)` | `File` | Gets or creates a File entity with the specified name within this Folder. |
53+
| `getFolder(name: string)` | `Folder` | Gets or creates a Folder entity with the specified name within this Folder. |
54+
| `remove` | `Promise<any>` | Removes (deletes) the current Entity from the file system. |
55+
| `removeSync` | `removeSync(onError?: function)` | Removes (deletes) the current Entity from the file system synchronously. |
56+
57+
## knownFolders Methods
58+
59+
| Name | Return Type | Description |
60+
|----------|---------|----------------|
61+
| `currentApp` | `Folder` | Gets the root folder for the current application. This Folder is private for the application and not accessible from Users/External apps. iOS - this folder is read-only and contains the app and all its resources. |
62+
| `documents` | `Folder` | Gets the Documents folder available for the current application. This Folder is private for the application and not accessible from Users/External apps. |
63+
| `temp` | `Folder` | Gets the Temporary (Caches) folder available for the current application. This Folder is private for the application and not accessible from Users/External apps. |
64+
65+
## path Methods
66+
67+
| Name | Return Type | Description |
68+
|----------|---------|----------------|
69+
| `join(...paths: string[])` | `string` | Joins all the provided string components, forming a valid and normalized path. |
70+
| `normalize(path: string)` | `string` | Normalizes a path, taking care of occurrances like ".." and "//". |
71+
72+
73+
## API References
74+
75+
| Name | Type |
76+
|----------|---------|
77+
| [tns-core-modules/file-system](https://docs.nativescript.org/api-reference/modules/_file_system_.html) | `Module` |
78+
| [FileSystem](https://docs.nativescript.org/api-reference/classes/_file_system_.file.html) | `Class` |
79+
| [FileSystemEntity](https://docs.nativescript.org/api-reference/classes/_file_system_.filesystementity.html) | `Class` |
80+
| [Folder](https://docs.nativescript.org/api-reference/classes/_file_system_.folder.html) | `Class` |
81+
| [knownFolders](https://docs.nativescript.org/api-reference/modules/_file_system_.knownfolders) | `Module` |
82+
| [path](https://docs.nativescript.org/api-reference/modules/_file_system_.path) | `Module` |
783

8-
**API Reference for the** [Folder Class](https://docs.nativescript.org/api-reference/classes/_file_system_.folder.html)

app/ns-framework-modules-category/file-system/file-system-page.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
const ListViewLinksModel = require("../../links-view-model");
22
const link = require("../../link");
33
const navigationLinks = [
4-
new link("Create", "ns-framework-modules-category/file-system/create/create-page"),
4+
new link("Usage", "ns-framework-modules-category/file-system/usage/usage-page"),
55
new link("Delete", "ns-framework-modules-category/file-system/delete/delete-page"),
66
new link("Paths", "ns-framework-modules-category/file-system/paths/paths-page"),
77
new link("Read", "ns-framework-modules-category/file-system/read/read-page"),
88
new link("Update", "ns-framework-modules-category/file-system/update/update-page")
99
];
1010
const navigationLinksTsc = [
11-
new link("Create", "ns-framework-modules-category/file-system/create/create-ts-page"),
11+
new link("Usage", "ns-framework-modules-category/file-system/usage/usage-ts-page"),
1212
new link("Delete", "ns-framework-modules-category/file-system/delete/delete-ts-page"),
1313
new link("Paths", "ns-framework-modules-category/file-system/paths/paths-ts-page"),
1414
new link("Read", "ns-framework-modules-category/file-system/read/read-ts-page"),

0 commit comments

Comments
 (0)