File tree Expand file tree Collapse file tree
packages/angular_devkit/core/src/virtual-fs Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,6 +46,12 @@ export function stringToFileBuffer(str: string): FileBuffer {
4646 }
4747}
4848
49+
50+ export const fileBuffer : TemplateTag < FileBuffer > = ( strings , ...values ) => {
51+ return stringToFileBuffer ( String . raw ( strings , ...values ) ) ;
52+ } ;
53+
54+
4955export function fileBufferToString ( fileBuffer : FileBuffer ) : string {
5056 if ( fileBuffer . toString . length == 1 ) {
5157 return ( fileBuffer . toString as ( enc : string ) => string ) ( 'utf-8' ) ;
Original file line number Diff line number Diff line change 66 * found in the LICENSE file at https://angular.io/license
77 */
88import { BaseException } from '../exception' ;
9+ import { TemplateTag } from '../utils/literals' ;
910
1011
1112export class InvalidPathException extends BaseException {
@@ -250,6 +251,11 @@ export function normalize(path: string): Path {
250251}
251252
252253
254+ export const path : TemplateTag < Path > = ( strings , ...values ) => {
255+ return normalize ( String . raw ( strings , ...values ) ) ;
256+ } ;
257+
258+
253259// Platform-specific paths.
254260export type WindowsPath = string & {
255261 __PRIVATE_DEVKIT_WINDOWS_PATH : void ;
You can’t perform that action at this time.
0 commit comments