UNPKG

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