Move readableBytesMb to common/bytes
This commit is contained in:
Родитель
91ea2f089e
Коммит
b2df8b6971
|
@ -0,0 +1,3 @@
|
|||
export function readableBytesMb(numBytes: number): string {
|
||||
return `${(numBytes / (1024 * 1024)).toFixed(1)} MB`;
|
||||
}
|
|
@ -4,6 +4,7 @@ import {
|
|||
ProgressOptions as VSCodeProgressOptions,
|
||||
window as Window,
|
||||
} from "vscode";
|
||||
import { readableBytesMb } from "../bytes";
|
||||
|
||||
export class UserCancellationException extends Error {
|
||||
/**
|
||||
|
@ -108,10 +109,6 @@ export function withInheritedProgress<R>(
|
|||
}
|
||||
}
|
||||
|
||||
export function readableBytesMb(numBytes: number): string {
|
||||
return `${(numBytes / (1024 * 1024)).toFixed(1)} MB`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a progress monitor that indicates how much progess has been made
|
||||
* reading from a stream.
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { readableBytesMb } from "../bytes";
|
||||
import { UnzipProgressCallback } from "../unzip";
|
||||
import { ProgressCallback, readableBytesMb } from "./progress";
|
||||
import { ProgressCallback } from "./progress";
|
||||
|
||||
export function reportUnzipProgress(
|
||||
messagePrefix: string,
|
||||
|
|
Загрузка…
Ссылка в новой задаче