@atomist/rug
Version:
TypeScript model for Atomist Rugs, see http://docs.atomist.com/
99 lines (85 loc) • 2.35 kB
text/typescript
/*
* Copyright 2015-2017 Atomist Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { TreeNode, GraphNode, FormatInfo, PathExpressionEngine } from "@atomist/rug/tree/PathExpression";
import { ProjectContext } from "@atomist/rug/operations/ProjectEditor";
import { ViewSupport } from "./ViewSupport";
import { Project } from "./Project";
export { FileArtifactBacked };
/**
* FileArtifactBacked
*/
interface FileArtifactBacked extends ViewSupport {
/**
* Return content length
*
* @property {string} content
*/
readonly content: string;
/**
* Return file size
*
* @property {number} contentLength
*/
readonly contentLength: number;
/**
* Return file name, excluding path
*
* @property {string} filename
*/
readonly filename: string;
/**
* DEPRECATED - Is this file well-formed?
*
* @property {boolean} isWellFormed
*/
readonly isWellFormed: boolean;
/**
* Return the number of lines in the file
*
* @property {number} lineCount
*/
readonly lineCount: number;
/**
* Make the file executable
*
*/
makeExecutable(): void;
/**
* Return file path, with forward slashes
*
* @property {string} path
*/
readonly path: string;
/**
* Return the file's permissions
*
* @property {number} permissions
*/
readonly permissions: number;
/**
* Containing project
*
* @property {Project} project
*/
readonly project: Project;
/**
* Does this path begin with the given pattern? Pattern should contain slashes but not begin with a /
*
* @param root {string} The root path to begin searching from
* @returns {boolean}
*/
underPath(root: string): boolean;
}