BREAKING CHANGE FileInfo.len renamed to FileName.size (#4338)

This commit is contained in:
dubiousjim 2020-03-14 22:57:42 -04:00 committed by GitHub
parent 0df9823cba
commit 6cc40b0865
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 22 additions and 26 deletions

View file

@ -661,7 +661,7 @@ declare namespace Deno {
append?: boolean;
/** Sets the option for truncating a previous file. If a file is
* successfully opened with this option set it will truncate the file to `0`
* length if it already exists. The file must be opened with write access
* size if it already exists. The file must be opened with write access
* for truncate to work. */
truncate?: boolean;
/** Sets the option to allow creating a new file, if one doesn't already
@ -1058,16 +1058,12 @@ declare namespace Deno {
// @url js/file_info.d.ts
/** UNSTABLE: 'len' maybe should be 'length' or 'size'.
*
* A FileInfo describes a file and is returned by `stat`, `lstat`,
/** A FileInfo describes a file and is returned by `stat`, `lstat`,
* `statSync`, `lstatSync`. A list of FileInfo is returned by `readdir`,
* `readdirSync`. */
export interface FileInfo {
/** **UNSTABLE**: `.len` maybe should be `.length` or `.size`.
*
* The size of the file, in bytes. */
len: number;
/** The size of the file, in bytes. */
size: number;
/** The last modification time of the file. This corresponds to the `mtime`
* field from `stat` on Linux/Mac OS and `ftLastWriteTime` on Windows. This
* may not be available on all platforms. */