UNPKG

1.26 kBTypeScriptView Raw
1import { TextDocument } from 'vscode-languageserver-textdocument';
2import { Range } from 'vscode-languageserver-types';
3import { Dockerfile } from '../dockerfile';
4import { Instruction } from '../instruction';
5export declare class Workdir extends Instruction {
6 constructor(document: TextDocument, range: Range, dockerfile: Dockerfile, escapeChar: string, instruction: string, instructionRange: Range);
7 /**
8 * Returns the path that has been defined. Note that this path may
9 * be absolute or relative depending on what was written in the
10 * instruction.
11 *
12 * @return the working directory's path, or null if this
13 * instruction has no arguments
14 */
15 getPath(): string | null;
16 /**
17 * Returns the absolute path that this instruction resolves to. The
18 * function will inspect prior WORKDIR instructions in the current
19 * image or another build stage in the Dockerfile to try to
20 * determine this.
21 *
22 * @return the absolute path of the working directory, or null if
23 * this instruction has no arguments, or undefined if it
24 * cannot be determined because only relative paths could be
25 * found
26 */
27 getAbsolutePath(): string | null | undefined;
28}