diff options
| author | Vincent LE GOFF <g_n_s@hotmail.fr> | 2019-03-14 15:24:54 +0100 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2019-03-14 10:24:54 -0400 |
| commit | 0b4f73cf9d6e7674c76126fc9d37defb58e7a433 (patch) | |
| tree | a7f47f908cf81ea36771b537fe043d3ed17bfc34 /fs/ensure_file.ts | |
| parent | a391660d2d539e3ca71418604e34df6c50dd6502 (diff) | |
Improve jsdoc (denoland/deno_std#277)
Original: https://github.com/denoland/deno_std/commit/1805c18ac7ed3aa6727f509ee2ec55f718ff2f61
Diffstat (limited to 'fs/ensure_file.ts')
| -rw-r--r-- | fs/ensure_file.ts | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/ensure_file.ts b/fs/ensure_file.ts index ef0af5300..56632f150 100644 --- a/fs/ensure_file.ts +++ b/fs/ensure_file.ts @@ -1,12 +1,11 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. import * as path from "./path/mod.ts"; import { ensureDir, ensureDirSync } from "./ensure_dir.ts"; + /** * Ensures that the file exists. - * If the file that is requested to be created is in directories that do not exist, these directories are created. If the file already exists, it is NOT MODIFIED. - * @export - * @param {string} filePath - * @returns {Promise<void>} + * If the file that is requested to be created is in directories that do not exist, + * these directories are created. If the file already exists, it is NOT MODIFIED. */ export async function ensureFile(filePath: string): Promise<void> { try { @@ -23,10 +22,8 @@ export async function ensureFile(filePath: string): Promise<void> { /** * Ensures that the file exists. - * If the file that is requested to be created is in directories that do not exist, these directories are created. If the file already exists, it is NOT MODIFIED. - * @export - * @param {string} filePath - * @returns {void} + * If the file that is requested to be created is in directories that do not exist, + * these directories are created. If the file already exists, it is NOT MODIFIED. */ export function ensureFileSync(filePath: string): void { try { |
