aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-resolver/src/resolvers/relative_fs_resolver.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sol-resolver/src/resolvers/relative_fs_resolver.ts')
-rw-r--r--packages/sol-resolver/src/resolvers/relative_fs_resolver.ts23
1 files changed, 0 insertions, 23 deletions
diff --git a/packages/sol-resolver/src/resolvers/relative_fs_resolver.ts b/packages/sol-resolver/src/resolvers/relative_fs_resolver.ts
deleted file mode 100644
index cfff145f9..000000000
--- a/packages/sol-resolver/src/resolvers/relative_fs_resolver.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import * as fs from 'fs';
-import * as path from 'path';
-
-import { ContractSource } from '../types';
-
-import { Resolver } from './resolver';
-
-export class RelativeFSResolver extends Resolver {
- private readonly _contractsDir: string;
- constructor(contractsDir: string) {
- super();
- this._contractsDir = contractsDir;
- }
- // tslint:disable-next-line:prefer-function-over-method
- public resolveIfExists(importPath: string): ContractSource | undefined {
- const filePath = path.resolve(path.join(this._contractsDir, importPath));
- if (fs.existsSync(filePath) && !fs.lstatSync(filePath).isDirectory()) {
- const fileContent = fs.readFileSync(filePath).toString();
- return { source: fileContent, path: importPath, absolutePath: filePath };
- }
- return undefined;
- }
-}