зеркало из https://github.com/mozilla/gecko-dev.git
Bug 783284 - [OS.File] Rename *Time to *Date. r=froydnj
This commit is contained in:
Родитель
086e5b07ec
Коммит
e9801e280b
|
@ -581,30 +581,30 @@
|
|||
* The creation time of this file.
|
||||
* @type {Date}
|
||||
*/
|
||||
get winCreationTime() {
|
||||
get winCreationDate() {
|
||||
let date = FILETIME_to_Date(this._ftCreationTime);
|
||||
delete this.winCreationTime;
|
||||
Object.defineProperty(this, "winCreationTime", {value: date});
|
||||
delete this.winCreationDate;
|
||||
Object.defineProperty(this, "winCreationDate", {value: date});
|
||||
return date;
|
||||
},
|
||||
/**
|
||||
* The last modification time of this file.
|
||||
* @type {Date}
|
||||
*/
|
||||
get winLastWriteTime() {
|
||||
get winLastWriteDate() {
|
||||
let date = FILETIME_to_Date(this._ftLastWriteTime);
|
||||
delete this.winLastWriteTime;
|
||||
Object.defineProperty(this, "winLastWriteTime", {value: date});
|
||||
delete this.winLastWriteDate;
|
||||
Object.defineProperty(this, "winLastWriteDate", {value: date});
|
||||
return date;
|
||||
},
|
||||
/**
|
||||
* The last access time of this file.
|
||||
* @type {Date}
|
||||
*/
|
||||
get winLastAccessTime() {
|
||||
get winLastAccessDate() {
|
||||
let date = FILETIME_to_Date(this._ftLastAccessTime);
|
||||
delete this.winLastAccessTime;
|
||||
Object.defineProperty(this, "winLastAccessTime", {value: date});
|
||||
delete this.winLastAccessDate;
|
||||
Object.defineProperty(this, "winLastAccessDate", {value: date});
|
||||
return date;
|
||||
},
|
||||
/**
|
||||
|
|
|
@ -327,15 +327,15 @@ function test_iter_dir()
|
|||
|
||||
if (OS.Win) {
|
||||
let year = new Date().getFullYear();
|
||||
let creation = entry.winCreationTime;
|
||||
let creation = entry.winCreationDate;
|
||||
ok(creation, "test_iter_dir: Windows creation date exists: " + creation);
|
||||
ok(creation.getFullYear() >= year - 1 && creation.getFullYear() <= year, "test_iter_dir: consistent creation date");
|
||||
|
||||
let lastWrite = entry.winLastWriteTime;
|
||||
let lastWrite = entry.winLastWriteDate;
|
||||
ok(lastWrite, "test_iter_dir: Windows lastWrite date exists: " + lastWrite);
|
||||
ok(lastWrite.getFullYear() >= year - 1 && lastWrite.getFullYear() <= year, "test_iter_dir: consistent lastWrite date");
|
||||
|
||||
let lastAccess = entry.winLastAccessTime;
|
||||
let lastAccess = entry.winLastAccessDate;
|
||||
ok(lastAccess, "test_iter_dir: Windows lastAccess date exists: " + lastAccess);
|
||||
ok(lastAccess.getFullYear() >= year - 1 && lastAccess.getFullYear() <= year, "test_iter_dir: consistent lastAccess date");
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче