• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

realm / realm-js / 5133612036

31 May 2023 01:41PM UTC coverage: 85.686%. First build
5133612036

push

github

takameyer
Fix warning for deprecated namespace setting method in Android

* Fixes #5646

829 of 1032 branches covered (80.33%)

Branch coverage included in aggregate %.

2218 of 2524 relevant lines covered (87.88%)

744.03 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

18.18
/packages/realm/src/platform/file-system.ts
1
////////////////////////////////////////////////////////////////////////////
2
//
3
// Copyright 2022 Realm Inc.
4
//
5
// Licensed under the Apache License, Version 2.0 (the "License");
6
// you may not use this file except in compliance with the License.
7
// You may obtain a copy of the License at
8
//
9
// http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing, software
12
// distributed under the License is distributed on an "AS IS" BASIS,
13
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
// See the License for the specific language governing permissions and
15
// limitations under the License.
16
//
17
////////////////////////////////////////////////////////////////////////////
18

19
type FileSystemType = {
20
  isAbsolutePath(path: string): boolean;
21
  joinPaths(...segments: string[]): string;
22
  removeFile(path: string): void;
23
  removeDirectory(path: string): void;
24
  ensureDirectoryForFile(path: string): void;
25
  getDefaultDirectoryPath(): string;
26
  exists(path: string): boolean;
27
  copyBundledRealmFiles(): void;
28
  // readDirectory(path: string): Dirent[];
29
  removeRealmFilesFromDirectory(path: string): void;
30
};
31

32
export type Dirent = {
33
  name: string;
34
  isFile(): boolean;
35
  isDirectory(): boolean;
36
};
37

38
export const fs: FileSystemType = {
1✔
39
  isAbsolutePath() {
40
    throw new Error("Not supported on this platform");
×
41
  },
42
  joinPaths() {
43
    throw new Error("Not supported on this platform");
×
44
  },
45
  removeFile() {
46
    throw new Error("Not supported on this platform");
×
47
  },
48
  getDefaultDirectoryPath() {
49
    throw new Error("Not supported on this platform");
×
50
  },
51
  exists() {
52
    throw new Error("Not supported on this platform");
×
53
  },
54
  copyBundledRealmFiles() {
55
    throw new Error("Not supported on this platform");
×
56
  },
57
  removeDirectory() {
58
    throw new Error("Not supported on this platform");
×
59
  },
60
  ensureDirectoryForFile() {
61
    throw new Error("Not supported on this platform");
×
62
  },
63
  /*
64
  readDirectory() {
65
    throw new Error("Not supported on this platform");
66
  },
67
  */
68
  removeRealmFilesFromDirectory() {
69
    throw new Error("Not supported on this platform");
×
70
  },
71
};
72

73
export function inject(injected: FileSystemType) {
74
  Object.freeze(Object.assign(fs, injected));
1✔
75
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc