You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -62,44 +61,44 @@ const fromFile = (stat, path, type = '') => new File([new BlobDataItem({
62
61
* @private
63
62
*/
64
63
classBlobDataItem{
65
-
#path;
66
-
#start;
64
+
#path
65
+
#start
67
66
68
-
constructor(options){
69
-
this.#path =options.path;
70
-
this.#start =options.start;
71
-
this.size=options.size;
72
-
this.lastModified=options.lastModified
73
-
}
67
+
constructor(options){
68
+
this.#path =options.path
69
+
this.#start =options.start
70
+
this.size=options.size
71
+
this.lastModified=options.lastModified
72
+
}
74
73
75
-
/**
76
-
* Slicing arguments is first validated and formatted
77
-
* to not be out of range by Blob.prototype.slice
78
-
*/
79
-
slice(start,end){
80
-
returnnewBlobDataItem({
81
-
path: this.#path,
82
-
lastModified: this.lastModified,
83
-
size: end-start,
84
-
start
85
-
});
86
-
}
74
+
/**
75
+
* Slicing arguments is first validated and formatted
76
+
* to not be out of range by Blob.prototype.slice
77
+
*/
78
+
slice(start,end){
79
+
returnnewBlobDataItem({
80
+
path: this.#path,
81
+
lastModified: this.lastModified,
82
+
size: end-start,
83
+
start
84
+
})
85
+
}
87
86
88
-
async*stream(){
89
-
const{mtimeMs}=awaitstat(this.#path)
90
-
if(mtimeMs>this.lastModified){
91
-
thrownewDOMException('The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.','NotReadableError');
92
-
}
93
-
yield*createReadStream(this.#path,{
94
-
start: this.#start,
95
-
end: this.#start +this.size-1
96
-
});
97
-
}
87
+
async*stream(){
88
+
const{mtimeMs}=awaitstat(this.#path)
89
+
if(mtimeMs>this.lastModified){
90
+
thrownewDOMException('The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.','NotReadableError')
0 commit comments