@ooneex/fs 0.0.13 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -498
- package/dist/index.js.map +2 -2
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Dirent as Dirent2, Stats as Stats2 } from "node:fs";
|
|
2
2
|
import { Dirent, Stats } from "node:fs";
|
|
3
|
-
import { watch as
|
|
3
|
+
import { watch as watch_gndkoffypz } from "node:fs";
|
|
4
4
|
/**
|
|
5
5
|
* Interface for file operations.
|
|
6
6
|
*
|
|
@@ -872,7 +872,7 @@ type DirectoryWatchCallbackType = (event: DirectoryWatchEventType, filename: str
|
|
|
872
872
|
* });
|
|
873
873
|
* ```
|
|
874
874
|
*/
|
|
875
|
-
type DirectoryWatcherType = ReturnType<typeof
|
|
875
|
+
type DirectoryWatcherType = ReturnType<typeof watch_gndkoffypz>;
|
|
876
876
|
/**
|
|
877
877
|
* A class for performing directory operations using Bun's optimized fs APIs.
|
|
878
878
|
*
|
package/dist/index.js
CHANGED
|
@@ -1,500 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
import { watch } from "fs";
|
|
4
|
-
import { cp, mkdir, readdir, rename, rm } from "fs/promises";
|
|
5
|
-
import { basename as basename2, dirname as dirname2, join as join2 } from "path";
|
|
2
|
+
import{watch as F}from"fs";import{cp as S,mkdir as m,readdir as B,rename as g,rm as P}from"fs/promises";import{basename as w,dirname as D,join as _}from"path";import{Exception as k}from"@ooneex/exception";import{HttpStatus as T}from"@ooneex/http-status";class Q extends k{constructor(H,R={}){super(H,{status:T.Code.InternalServerError,data:R});this.name="DirectoryException"}}import{basename as v,dirname as E,extname as j,join as x}from"path";import{Exception as N}from"@ooneex/exception";import{HttpStatus as z}from"@ooneex/http-status";class V extends N{constructor(H,R={}){super(H,{status:z.Code.InternalServerError,data:R});this.name="FileException"}}class U{path;options;constructor(H,R){let J=H instanceof URL?H.pathname:H,q=J.startsWith("/"),K=x(...J.split(/[/\\]/));this.path=q?`/${K}`:K,this.options=R}getBunFile(){return Bun.file(this.path,this.options)}getPath(){return this.path}getName(){return v(this.path)}getExtension(){let H=j(this.path);return H.startsWith(".")?H.slice(1):H}getDirectory(){return new $(E(this.path))}getSize(){return this.getBunFile().size}getType(){return this.getBunFile().type}async exists(){try{return(await this.getBunFile().stat()).isFile()}catch{return!1}}async text(){try{return await this.getBunFile().text()}catch(H){throw new V(`Failed to read file as text: ${this.path}`,{path:this.path,error:H instanceof Error?H.message:String(H)})}}async json(){try{return await this.getBunFile().json()}catch(H){throw new V(`Failed to read file as JSON: ${this.path}`,{path:this.path,error:H instanceof Error?H.message:String(H)})}}async arrayBuffer(){try{return await this.getBunFile().arrayBuffer()}catch(H){throw new V(`Failed to read file as ArrayBuffer: ${this.path}`,{path:this.path,error:H instanceof Error?H.message:String(H)})}}async bytes(){try{return await this.getBunFile().bytes()}catch(H){throw new V(`Failed to read file as Uint8Array: ${this.path}`,{path:this.path,error:H instanceof Error?H.message:String(H)})}}stream(){return this.getBunFile().stream()}streamAsText(){let H=this.getBunFile().stream(),R=new TextDecoder;return new ReadableStream({async start(J){let q=H.getReader();try{while(!0){let{done:K,value:Y}=await q.read();if(K)break;J.enqueue(R.decode(Y,{stream:!0}))}J.close()}catch(K){J.error(K)}finally{q.releaseLock()}}})}streamAsJson(){let H=this.getBunFile().stream(),R=new TextDecoder,J="",q=0,K=!1,Y=!1,G=-1,O=!1;return new ReadableStream({async start(I){let C=H.getReader();try{while(!0){let{done:M,value:L}=await C.read();if(M)break;J+=R.decode(L,{stream:!0});let X=0;while(X<J.length){let Z=J[X];if(Y){Y=!1,X++;continue}if(Z==="\\"&&K){Y=!0,X++;continue}if(Z==='"'){K=!K,X++;continue}if(K){X++;continue}if(Z==="["&&!O){O=!0,X++;continue}if(Z==="{"||Z==="["){if(q===0)G=X;q++}else if(Z==="}"||Z==="]"){if(q--,q===0&&G!==-1){let W=J.slice(G,X+1);try{let A=JSON.parse(W);I.enqueue(A)}catch{}J=J.slice(X+1),X=-1,G=-1}}X++}}I.close()}catch(M){I.error(M)}finally{C.releaseLock()}}})}async write(H){try{return await Bun.write(this.path,H)}catch(R){throw new V(`Failed to write to file: ${this.path}`,{path:this.path,error:R instanceof Error?R.message:String(R)})}}async append(H){try{let R=this.getBunFile(),q=await R.exists()?await R.bytes():new Uint8Array(0),K=typeof H==="string"?new TextEncoder().encode(H):H,Y=new Uint8Array(q.length+K.length);return Y.set(q),Y.set(K,q.length),await Bun.write(this.path,Y)}catch(R){throw new V(`Failed to append to file: ${this.path}`,{path:this.path,error:R instanceof Error?R.message:String(R)})}}async copy(H){try{return await Bun.write(H,this.getBunFile()),new U(H)}catch(R){throw new V(`Failed to copy file: ${this.path}`,{path:this.path,destination:H,error:R instanceof Error?R.message:String(R)})}}async delete(){try{await this.getBunFile().delete()}catch(H){throw new V(`Failed to delete file: ${this.path}`,{path:this.path,error:H instanceof Error?H.message:String(H)})}}async download(H){try{let R=await fetch(H);if(!R.ok)throw new V(`HTTP error: ${R.status} ${R.statusText}`);return await Bun.write(this.path,R)}catch(R){throw new V(`Failed to download file from URL: ${H.toString()}`,{path:this.path,url:H.toString(),error:R instanceof Error?R.message:String(R)})}}writer(H){return this.getBunFile().writer(H)}}class ${path;constructor(H){let R=H.startsWith("/"),J=_(...H.split(/[/\\]/));this.path=R?`/${J}`:J}getPath(){return this.path}getName(){return w(this.path)}getParent(){return D(this.path)}async exists(){try{return(await Bun.file(this.path).stat()).isDirectory()}catch{return!1}}async mkdir(H){try{await m(this.path,{recursive:H?.recursive??!0,mode:H?.mode})}catch(R){throw new Q(`Failed to create directory: ${this.path}`,{path:this.path,error:R instanceof Error?R.message:String(R)})}}async rm(H){try{await P(this.path,{recursive:H?.recursive??!0,force:H?.force??!1})}catch(R){throw new Q(`Failed to delete directory: ${this.path}`,{path:this.path,error:R instanceof Error?R.message:String(R)})}}async ls(H){try{return await B(this.path,{recursive:H?.recursive??!1})}catch(R){throw new Q(`Failed to list directory contents: ${this.path}`,{path:this.path,error:R instanceof Error?R.message:String(R)})}}async lsWithTypes(H){try{return await B(this.path,{withFileTypes:!0,recursive:H?.recursive??!1})}catch(R){throw new Q(`Failed to list directory contents with types: ${this.path}`,{path:this.path,error:R instanceof Error?R.message:String(R)})}}async cp(H,R){try{await S(this.path,H,{recursive:R?.recursive??!0,force:R?.overwrite??!1})}catch(J){throw new Q(`Failed to copy directory: ${this.path}`,{path:this.path,destination:H,error:J instanceof Error?J.message:String(J)})}}async mv(H){try{await g(this.path,H)}catch(R){throw new Q(`Failed to move directory: ${this.path}`,{path:this.path,destination:H,error:R instanceof Error?R.message:String(R)})}}async stat(){try{return await Bun.file(this.path).stat()}catch(H){throw new Q(`Failed to get directory stats: ${this.path}`,{path:this.path,error:H instanceof Error?H.message:String(H)})}}watch(H,R){return F(this.path,{recursive:R?.recursive??!1},H)}async isEmpty(){try{return(await B(this.path)).length===0}catch(H){throw new Q(`Failed to check if directory is empty: ${this.path}`,{path:this.path,error:H instanceof Error?H.message:String(H)})}}async getSize(){try{return await this.calculateSize(this.path)}catch(H){throw new Q(`Failed to calculate directory size: ${this.path}`,{path:this.path,error:H instanceof Error?H.message:String(H)})}}async getFiles(H){try{let J=(await B(this.path,{withFileTypes:!0,recursive:H?.recursive??!1})).filter((q)=>q.isFile()).map((q)=>{if(q.parentPath&&q.parentPath!==this.path){let K=q.parentPath.slice(this.path.length+1);return _(K,q.name)}return q.name});if(H?.pattern){let q=H.pattern;J=J.filter((K)=>q.test(K))}return J.map((q)=>new U(_(this.path,q)))}catch(R){throw new Q(`Failed to get files from directory: ${this.path}`,{path:this.path,error:R instanceof Error?R.message:String(R)})}}async getDirectories(H){try{let J=(await B(this.path,{withFileTypes:!0,recursive:H?.recursive??!1})).filter((q)=>q.isDirectory()).map((q)=>{if(q.parentPath&&q.parentPath!==this.path){let K=q.parentPath.slice(this.path.length+1);return _(K,q.name)}return q.name});if(H?.pattern){let q=H.pattern;J=J.filter((K)=>q.test(K))}return J.map((q)=>new $(_(this.path,q)))}catch(R){throw new Q(`Failed to get directories from directory: ${this.path}`,{path:this.path,error:R instanceof Error?R.message:String(R)})}}cd(...H){return new $(_(this.path,...H))}async calculateSize(H){let R=0,J=await B(H,{withFileTypes:!0});for(let q of J){let K=_(H,q.name);if(q.isDirectory())R+=await this.calculateSize(K);else if(q.isFile())R+=Bun.file(K).size}return R}}export{V as FileException,U as File,Q as DirectoryException,$ as Directory};
|
|
6
3
|
|
|
7
|
-
|
|
8
|
-
import { Exception } from "@ooneex/exception";
|
|
9
|
-
import { HttpStatus } from "@ooneex/http-status";
|
|
10
|
-
|
|
11
|
-
class DirectoryException extends Exception {
|
|
12
|
-
constructor(message, data = {}) {
|
|
13
|
-
super(message, {
|
|
14
|
-
status: HttpStatus.Code.InternalServerError,
|
|
15
|
-
data
|
|
16
|
-
});
|
|
17
|
-
this.name = "DirectoryException";
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// src/File.ts
|
|
22
|
-
import { basename, dirname, extname, join } from "path";
|
|
23
|
-
|
|
24
|
-
// src/FileException.ts
|
|
25
|
-
import { Exception as Exception2 } from "@ooneex/exception";
|
|
26
|
-
import { HttpStatus as HttpStatus2 } from "@ooneex/http-status";
|
|
27
|
-
|
|
28
|
-
class FileException extends Exception2 {
|
|
29
|
-
constructor(message, data = {}) {
|
|
30
|
-
super(message, {
|
|
31
|
-
status: HttpStatus2.Code.InternalServerError,
|
|
32
|
-
data
|
|
33
|
-
});
|
|
34
|
-
this.name = "FileException";
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// src/File.ts
|
|
39
|
-
class File {
|
|
40
|
-
path;
|
|
41
|
-
options;
|
|
42
|
-
constructor(path, options) {
|
|
43
|
-
const pathStr = path instanceof URL ? path.pathname : path;
|
|
44
|
-
const isAbsolute = pathStr.startsWith("/");
|
|
45
|
-
const normalized = join(...pathStr.split(/[/\\]/));
|
|
46
|
-
this.path = isAbsolute ? `/${normalized}` : normalized;
|
|
47
|
-
this.options = options;
|
|
48
|
-
}
|
|
49
|
-
getBunFile() {
|
|
50
|
-
return Bun.file(this.path, this.options);
|
|
51
|
-
}
|
|
52
|
-
getPath() {
|
|
53
|
-
return this.path;
|
|
54
|
-
}
|
|
55
|
-
getName() {
|
|
56
|
-
return basename(this.path);
|
|
57
|
-
}
|
|
58
|
-
getExtension() {
|
|
59
|
-
const ext = extname(this.path);
|
|
60
|
-
return ext.startsWith(".") ? ext.slice(1) : ext;
|
|
61
|
-
}
|
|
62
|
-
getDirectory() {
|
|
63
|
-
return new Directory(dirname(this.path));
|
|
64
|
-
}
|
|
65
|
-
getSize() {
|
|
66
|
-
return this.getBunFile().size;
|
|
67
|
-
}
|
|
68
|
-
getType() {
|
|
69
|
-
return this.getBunFile().type;
|
|
70
|
-
}
|
|
71
|
-
async exists() {
|
|
72
|
-
try {
|
|
73
|
-
const stats = await this.getBunFile().stat();
|
|
74
|
-
return stats.isFile();
|
|
75
|
-
} catch {
|
|
76
|
-
return false;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
async text() {
|
|
80
|
-
try {
|
|
81
|
-
return await this.getBunFile().text();
|
|
82
|
-
} catch (error) {
|
|
83
|
-
throw new FileException(`Failed to read file as text: ${this.path}`, {
|
|
84
|
-
path: this.path,
|
|
85
|
-
error: error instanceof Error ? error.message : String(error)
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
async json() {
|
|
90
|
-
try {
|
|
91
|
-
return await this.getBunFile().json();
|
|
92
|
-
} catch (error) {
|
|
93
|
-
throw new FileException(`Failed to read file as JSON: ${this.path}`, {
|
|
94
|
-
path: this.path,
|
|
95
|
-
error: error instanceof Error ? error.message : String(error)
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
async arrayBuffer() {
|
|
100
|
-
try {
|
|
101
|
-
return await this.getBunFile().arrayBuffer();
|
|
102
|
-
} catch (error) {
|
|
103
|
-
throw new FileException(`Failed to read file as ArrayBuffer: ${this.path}`, {
|
|
104
|
-
path: this.path,
|
|
105
|
-
error: error instanceof Error ? error.message : String(error)
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
async bytes() {
|
|
110
|
-
try {
|
|
111
|
-
return await this.getBunFile().bytes();
|
|
112
|
-
} catch (error) {
|
|
113
|
-
throw new FileException(`Failed to read file as Uint8Array: ${this.path}`, {
|
|
114
|
-
path: this.path,
|
|
115
|
-
error: error instanceof Error ? error.message : String(error)
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
stream() {
|
|
120
|
-
return this.getBunFile().stream();
|
|
121
|
-
}
|
|
122
|
-
streamAsText() {
|
|
123
|
-
const byteStream = this.getBunFile().stream();
|
|
124
|
-
const decoder = new TextDecoder;
|
|
125
|
-
return new ReadableStream({
|
|
126
|
-
async start(controller) {
|
|
127
|
-
const reader = byteStream.getReader();
|
|
128
|
-
try {
|
|
129
|
-
while (true) {
|
|
130
|
-
const { done, value } = await reader.read();
|
|
131
|
-
if (done) {
|
|
132
|
-
break;
|
|
133
|
-
}
|
|
134
|
-
controller.enqueue(decoder.decode(value, { stream: true }));
|
|
135
|
-
}
|
|
136
|
-
controller.close();
|
|
137
|
-
} catch (error) {
|
|
138
|
-
controller.error(error);
|
|
139
|
-
} finally {
|
|
140
|
-
reader.releaseLock();
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
streamAsJson() {
|
|
146
|
-
const byteStream = this.getBunFile().stream();
|
|
147
|
-
const decoder = new TextDecoder;
|
|
148
|
-
let buffer = "";
|
|
149
|
-
let depth = 0;
|
|
150
|
-
let inString = false;
|
|
151
|
-
let isEscape = false;
|
|
152
|
-
let objectStart = -1;
|
|
153
|
-
let arrayStarted = false;
|
|
154
|
-
return new ReadableStream({
|
|
155
|
-
async start(controller) {
|
|
156
|
-
const reader = byteStream.getReader();
|
|
157
|
-
try {
|
|
158
|
-
while (true) {
|
|
159
|
-
const { done, value } = await reader.read();
|
|
160
|
-
if (done) {
|
|
161
|
-
break;
|
|
162
|
-
}
|
|
163
|
-
buffer += decoder.decode(value, { stream: true });
|
|
164
|
-
let i = 0;
|
|
165
|
-
while (i < buffer.length) {
|
|
166
|
-
const char = buffer[i];
|
|
167
|
-
if (isEscape) {
|
|
168
|
-
isEscape = false;
|
|
169
|
-
i++;
|
|
170
|
-
continue;
|
|
171
|
-
}
|
|
172
|
-
if (char === "\\" && inString) {
|
|
173
|
-
isEscape = true;
|
|
174
|
-
i++;
|
|
175
|
-
continue;
|
|
176
|
-
}
|
|
177
|
-
if (char === '"') {
|
|
178
|
-
inString = !inString;
|
|
179
|
-
i++;
|
|
180
|
-
continue;
|
|
181
|
-
}
|
|
182
|
-
if (inString) {
|
|
183
|
-
i++;
|
|
184
|
-
continue;
|
|
185
|
-
}
|
|
186
|
-
if (char === "[" && !arrayStarted) {
|
|
187
|
-
arrayStarted = true;
|
|
188
|
-
i++;
|
|
189
|
-
continue;
|
|
190
|
-
}
|
|
191
|
-
if (char === "{" || char === "[") {
|
|
192
|
-
if (depth === 0) {
|
|
193
|
-
objectStart = i;
|
|
194
|
-
}
|
|
195
|
-
depth++;
|
|
196
|
-
} else if (char === "}" || char === "]") {
|
|
197
|
-
depth--;
|
|
198
|
-
if (depth === 0 && objectStart !== -1) {
|
|
199
|
-
const jsonStr = buffer.slice(objectStart, i + 1);
|
|
200
|
-
try {
|
|
201
|
-
const parsed = JSON.parse(jsonStr);
|
|
202
|
-
controller.enqueue(parsed);
|
|
203
|
-
} catch {}
|
|
204
|
-
buffer = buffer.slice(i + 1);
|
|
205
|
-
i = -1;
|
|
206
|
-
objectStart = -1;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
i++;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
controller.close();
|
|
213
|
-
} catch (error) {
|
|
214
|
-
controller.error(error);
|
|
215
|
-
} finally {
|
|
216
|
-
reader.releaseLock();
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
async write(data) {
|
|
222
|
-
try {
|
|
223
|
-
return await Bun.write(this.path, data);
|
|
224
|
-
} catch (error) {
|
|
225
|
-
throw new FileException(`Failed to write to file: ${this.path}`, {
|
|
226
|
-
path: this.path,
|
|
227
|
-
error: error instanceof Error ? error.message : String(error)
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
async append(data) {
|
|
232
|
-
try {
|
|
233
|
-
const bunFile = this.getBunFile();
|
|
234
|
-
const fileExists = await bunFile.exists();
|
|
235
|
-
const existingContent = fileExists ? await bunFile.bytes() : new Uint8Array(0);
|
|
236
|
-
const newData = typeof data === "string" ? new TextEncoder().encode(data) : data;
|
|
237
|
-
const combined = new Uint8Array(existingContent.length + newData.length);
|
|
238
|
-
combined.set(existingContent);
|
|
239
|
-
combined.set(newData, existingContent.length);
|
|
240
|
-
return await Bun.write(this.path, combined);
|
|
241
|
-
} catch (error) {
|
|
242
|
-
throw new FileException(`Failed to append to file: ${this.path}`, {
|
|
243
|
-
path: this.path,
|
|
244
|
-
error: error instanceof Error ? error.message : String(error)
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
async copy(destination) {
|
|
249
|
-
try {
|
|
250
|
-
await Bun.write(destination, this.getBunFile());
|
|
251
|
-
return new File(destination);
|
|
252
|
-
} catch (error) {
|
|
253
|
-
throw new FileException(`Failed to copy file: ${this.path}`, {
|
|
254
|
-
path: this.path,
|
|
255
|
-
destination,
|
|
256
|
-
error: error instanceof Error ? error.message : String(error)
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
async delete() {
|
|
261
|
-
try {
|
|
262
|
-
await this.getBunFile().delete();
|
|
263
|
-
} catch (error) {
|
|
264
|
-
throw new FileException(`Failed to delete file: ${this.path}`, {
|
|
265
|
-
path: this.path,
|
|
266
|
-
error: error instanceof Error ? error.message : String(error)
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
async download(url) {
|
|
271
|
-
try {
|
|
272
|
-
const response = await fetch(url);
|
|
273
|
-
if (!response.ok) {
|
|
274
|
-
throw new FileException(`HTTP error: ${response.status} ${response.statusText}`);
|
|
275
|
-
}
|
|
276
|
-
return await Bun.write(this.path, response);
|
|
277
|
-
} catch (error) {
|
|
278
|
-
throw new FileException(`Failed to download file from URL: ${url.toString()}`, {
|
|
279
|
-
path: this.path,
|
|
280
|
-
url: url.toString(),
|
|
281
|
-
error: error instanceof Error ? error.message : String(error)
|
|
282
|
-
});
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
writer(options) {
|
|
286
|
-
return this.getBunFile().writer(options);
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
// src/Directory.ts
|
|
291
|
-
class Directory {
|
|
292
|
-
path;
|
|
293
|
-
constructor(path) {
|
|
294
|
-
const isAbsolute = path.startsWith("/");
|
|
295
|
-
const normalized = join2(...path.split(/[/\\]/));
|
|
296
|
-
this.path = isAbsolute ? `/${normalized}` : normalized;
|
|
297
|
-
}
|
|
298
|
-
getPath() {
|
|
299
|
-
return this.path;
|
|
300
|
-
}
|
|
301
|
-
getName() {
|
|
302
|
-
return basename2(this.path);
|
|
303
|
-
}
|
|
304
|
-
getParent() {
|
|
305
|
-
return dirname2(this.path);
|
|
306
|
-
}
|
|
307
|
-
async exists() {
|
|
308
|
-
try {
|
|
309
|
-
const stats = await Bun.file(this.path).stat();
|
|
310
|
-
return stats.isDirectory();
|
|
311
|
-
} catch {
|
|
312
|
-
return false;
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
async mkdir(options) {
|
|
316
|
-
try {
|
|
317
|
-
await mkdir(this.path, {
|
|
318
|
-
recursive: options?.recursive ?? true,
|
|
319
|
-
mode: options?.mode
|
|
320
|
-
});
|
|
321
|
-
} catch (error) {
|
|
322
|
-
throw new DirectoryException(`Failed to create directory: ${this.path}`, {
|
|
323
|
-
path: this.path,
|
|
324
|
-
error: error instanceof Error ? error.message : String(error)
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
async rm(options) {
|
|
329
|
-
try {
|
|
330
|
-
await rm(this.path, {
|
|
331
|
-
recursive: options?.recursive ?? true,
|
|
332
|
-
force: options?.force ?? false
|
|
333
|
-
});
|
|
334
|
-
} catch (error) {
|
|
335
|
-
throw new DirectoryException(`Failed to delete directory: ${this.path}`, {
|
|
336
|
-
path: this.path,
|
|
337
|
-
error: error instanceof Error ? error.message : String(error)
|
|
338
|
-
});
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
async ls(options) {
|
|
342
|
-
try {
|
|
343
|
-
const entries = await readdir(this.path, {
|
|
344
|
-
recursive: options?.recursive ?? false
|
|
345
|
-
});
|
|
346
|
-
return entries;
|
|
347
|
-
} catch (error) {
|
|
348
|
-
throw new DirectoryException(`Failed to list directory contents: ${this.path}`, {
|
|
349
|
-
path: this.path,
|
|
350
|
-
error: error instanceof Error ? error.message : String(error)
|
|
351
|
-
});
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
async lsWithTypes(options) {
|
|
355
|
-
try {
|
|
356
|
-
return await readdir(this.path, {
|
|
357
|
-
withFileTypes: true,
|
|
358
|
-
recursive: options?.recursive ?? false
|
|
359
|
-
});
|
|
360
|
-
} catch (error) {
|
|
361
|
-
throw new DirectoryException(`Failed to list directory contents with types: ${this.path}`, {
|
|
362
|
-
path: this.path,
|
|
363
|
-
error: error instanceof Error ? error.message : String(error)
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
async cp(destination, options) {
|
|
368
|
-
try {
|
|
369
|
-
await cp(this.path, destination, {
|
|
370
|
-
recursive: options?.recursive ?? true,
|
|
371
|
-
force: options?.overwrite ?? false
|
|
372
|
-
});
|
|
373
|
-
} catch (error) {
|
|
374
|
-
throw new DirectoryException(`Failed to copy directory: ${this.path}`, {
|
|
375
|
-
path: this.path,
|
|
376
|
-
destination,
|
|
377
|
-
error: error instanceof Error ? error.message : String(error)
|
|
378
|
-
});
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
async mv(destination) {
|
|
382
|
-
try {
|
|
383
|
-
await rename(this.path, destination);
|
|
384
|
-
} catch (error) {
|
|
385
|
-
throw new DirectoryException(`Failed to move directory: ${this.path}`, {
|
|
386
|
-
path: this.path,
|
|
387
|
-
destination,
|
|
388
|
-
error: error instanceof Error ? error.message : String(error)
|
|
389
|
-
});
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
async stat() {
|
|
393
|
-
try {
|
|
394
|
-
return await Bun.file(this.path).stat();
|
|
395
|
-
} catch (error) {
|
|
396
|
-
throw new DirectoryException(`Failed to get directory stats: ${this.path}`, {
|
|
397
|
-
path: this.path,
|
|
398
|
-
error: error instanceof Error ? error.message : String(error)
|
|
399
|
-
});
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
watch(callback, options) {
|
|
403
|
-
return watch(this.path, { recursive: options?.recursive ?? false }, callback);
|
|
404
|
-
}
|
|
405
|
-
async isEmpty() {
|
|
406
|
-
try {
|
|
407
|
-
const entries = await readdir(this.path);
|
|
408
|
-
return entries.length === 0;
|
|
409
|
-
} catch (error) {
|
|
410
|
-
throw new DirectoryException(`Failed to check if directory is empty: ${this.path}`, {
|
|
411
|
-
path: this.path,
|
|
412
|
-
error: error instanceof Error ? error.message : String(error)
|
|
413
|
-
});
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
async getSize() {
|
|
417
|
-
try {
|
|
418
|
-
return await this.calculateSize(this.path);
|
|
419
|
-
} catch (error) {
|
|
420
|
-
throw new DirectoryException(`Failed to calculate directory size: ${this.path}`, {
|
|
421
|
-
path: this.path,
|
|
422
|
-
error: error instanceof Error ? error.message : String(error)
|
|
423
|
-
});
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
async getFiles(options) {
|
|
427
|
-
try {
|
|
428
|
-
const entries = await readdir(this.path, {
|
|
429
|
-
withFileTypes: true,
|
|
430
|
-
recursive: options?.recursive ?? false
|
|
431
|
-
});
|
|
432
|
-
let filePaths = entries.filter((entry) => entry.isFile()).map((entry) => {
|
|
433
|
-
if (entry.parentPath && entry.parentPath !== this.path) {
|
|
434
|
-
const relativePath = entry.parentPath.slice(this.path.length + 1);
|
|
435
|
-
return join2(relativePath, entry.name);
|
|
436
|
-
}
|
|
437
|
-
return entry.name;
|
|
438
|
-
});
|
|
439
|
-
if (options?.pattern) {
|
|
440
|
-
const pattern = options.pattern;
|
|
441
|
-
filePaths = filePaths.filter((filePath) => pattern.test(filePath));
|
|
442
|
-
}
|
|
443
|
-
return filePaths.map((filePath) => new File(join2(this.path, filePath)));
|
|
444
|
-
} catch (error) {
|
|
445
|
-
throw new DirectoryException(`Failed to get files from directory: ${this.path}`, {
|
|
446
|
-
path: this.path,
|
|
447
|
-
error: error instanceof Error ? error.message : String(error)
|
|
448
|
-
});
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
async getDirectories(options) {
|
|
452
|
-
try {
|
|
453
|
-
const entries = await readdir(this.path, {
|
|
454
|
-
withFileTypes: true,
|
|
455
|
-
recursive: options?.recursive ?? false
|
|
456
|
-
});
|
|
457
|
-
let dirPaths = entries.filter((entry) => entry.isDirectory()).map((entry) => {
|
|
458
|
-
if (entry.parentPath && entry.parentPath !== this.path) {
|
|
459
|
-
const relativePath = entry.parentPath.slice(this.path.length + 1);
|
|
460
|
-
return join2(relativePath, entry.name);
|
|
461
|
-
}
|
|
462
|
-
return entry.name;
|
|
463
|
-
});
|
|
464
|
-
if (options?.pattern) {
|
|
465
|
-
const pattern = options.pattern;
|
|
466
|
-
dirPaths = dirPaths.filter((dirPath) => pattern.test(dirPath));
|
|
467
|
-
}
|
|
468
|
-
return dirPaths.map((dirPath) => new Directory(join2(this.path, dirPath)));
|
|
469
|
-
} catch (error) {
|
|
470
|
-
throw new DirectoryException(`Failed to get directories from directory: ${this.path}`, {
|
|
471
|
-
path: this.path,
|
|
472
|
-
error: error instanceof Error ? error.message : String(error)
|
|
473
|
-
});
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
cd(...paths) {
|
|
477
|
-
return new Directory(join2(this.path, ...paths));
|
|
478
|
-
}
|
|
479
|
-
async calculateSize(dirPath) {
|
|
480
|
-
let totalSize = 0;
|
|
481
|
-
const entries = await readdir(dirPath, { withFileTypes: true });
|
|
482
|
-
for (const entry of entries) {
|
|
483
|
-
const fullPath = join2(dirPath, entry.name);
|
|
484
|
-
if (entry.isDirectory()) {
|
|
485
|
-
totalSize += await this.calculateSize(fullPath);
|
|
486
|
-
} else if (entry.isFile()) {
|
|
487
|
-
totalSize += Bun.file(fullPath).size;
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
return totalSize;
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
export {
|
|
494
|
-
FileException,
|
|
495
|
-
File,
|
|
496
|
-
DirectoryException,
|
|
497
|
-
Directory
|
|
498
|
-
};
|
|
499
|
-
|
|
500
|
-
//# debugId=523DA10FA8A8955664756E2164756E21
|
|
4
|
+
//# debugId=329F88F8B0F876C764756E2164756E21
|
package/dist/index.js.map
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"import { basename, dirname, extname, join } from \"node:path\";\nimport type { BunFile } from \"bun\";\nimport { Directory } from \"./Directory\";\nimport { FileException } from \"./FileException\";\nimport type {\n BunFileSinkType,\n FileOptionsType,\n FileWriteDataType,\n FileWriterOptionsType,\n IDirectory,\n IFile,\n} from \"./types\";\n\n/**\n * A class for performing file operations using Bun's optimized file I/O APIs.\n *\n * @example\n * ```typescript\n * import { File } from \"@ooneex/fs\";\n *\n * const file = new File(\"/path/to/file.txt\");\n *\n * // Read file content\n * const content = await file.text();\n *\n * // Write to file\n * await file.write(\"Hello, World!\");\n *\n * // Check if file exists\n * if (await file.exists()) {\n * console.log(\"File exists!\");\n * }\n * ```\n */\nexport class File implements IFile {\n private readonly path: string;\n private readonly options: FileOptionsType | undefined;\n\n /**\n * Creates a new File instance.\n *\n * @param path - The file path as a string or URL\n * @param options - Optional configuration options\n *\n * @example\n * ```typescript\n * // Using string path\n * const file = new File(\"/path/to/file.txt\");\n *\n * // Using URL\n * const file = new File(new URL(\"file:///path/to/file.txt\"));\n *\n * // With custom MIME type\n * const file = new File(\"/path/to/file\", { type: \"application/json\" });\n * ```\n */\n constructor(path: string | URL, options?: FileOptionsType) {\n const pathStr = path instanceof URL ? path.pathname : path;\n const isAbsolute = pathStr.startsWith(\"/\");\n const normalized = join(...pathStr.split(/[/\\\\]/));\n this.path = isAbsolute ? `/${normalized}` : normalized;\n this.options = options;\n }\n\n private getBunFile(): BunFile {\n return Bun.file(this.path, this.options);\n }\n\n /**\n * Returns the file path.\n *\n * @returns The absolute or relative path of the file\n *\n * @example\n * ```typescript\n * const file = new File(\"/path/to/document.pdf\");\n * console.log(file.getPath()); // \"/path/to/document.pdf\"\n * ```\n */\n public getPath(): string {\n return this.path;\n }\n\n /**\n * Returns the file name including extension.\n *\n * @returns The base name of the file\n *\n * @example\n * ```typescript\n * const file = new File(\"/path/to/document.pdf\");\n * console.log(file.getName()); // \"document.pdf\"\n * ```\n */\n public getName(): string {\n return basename(this.path);\n }\n\n /**\n * Returns the file extension without the leading dot.\n *\n * @returns The file extension or empty string if none\n *\n * @example\n * ```typescript\n * const file = new File(\"/path/to/document.pdf\");\n * console.log(file.getExtension()); // \"pdf\"\n *\n * const noExt = new File(\"/path/to/README\");\n * console.log(noExt.getExtension()); // \"\"\n * ```\n */\n public getExtension(): string {\n const ext = extname(this.path);\n return ext.startsWith(\".\") ? ext.slice(1) : ext;\n }\n\n /**\n * Returns the directory containing the file.\n *\n * @returns The parent directory as an IDirectory instance\n *\n * @example\n * ```typescript\n * const file = new File(\"/path/to/document.pdf\");\n * const dir = file.getDirectory();\n * console.log(dir.getPath()); // \"/path/to\"\n * ```\n */\n public getDirectory(): IDirectory {\n return new Directory(dirname(this.path));\n }\n\n /**\n * Returns the file size in bytes.\n *\n * @returns The size of the file in bytes, or 0 if file doesn't exist\n *\n * @example\n * ```typescript\n * const file = new File(\"/path/to/document.pdf\");\n * console.log(file.getSize()); // 1024\n * ```\n */\n public getSize(): number {\n return this.getBunFile().size;\n }\n\n /**\n * Returns the MIME type of the file.\n *\n * @returns The MIME type string (e.g., \"text/plain\", \"application/json\")\n *\n * @example\n * ```typescript\n * const txtFile = new File(\"/path/to/file.txt\");\n * console.log(txtFile.getType()); // \"text/plain;charset=utf-8\"\n *\n * const jsonFile = new File(\"/path/to/data.json\");\n * console.log(jsonFile.getType()); // \"application/json;charset=utf-8\"\n * ```\n */\n public getType(): string {\n return this.getBunFile().type;\n }\n\n /**\n * Checks if the file exists on disk.\n *\n * @returns A promise that resolves to true if the file exists\n *\n * @example\n * ```typescript\n * const file = new File(\"/path/to/file.txt\");\n *\n * if (await file.exists()) {\n * console.log(\"File exists!\");\n * } else {\n * console.log(\"File not found\");\n * }\n * ```\n */\n public async exists(): Promise<boolean> {\n try {\n const stats = await this.getBunFile().stat();\n return stats.isFile();\n } catch {\n return false;\n }\n }\n\n /**\n * Reads the file content as a string.\n *\n * @returns A promise that resolves to the file content as a string\n * @throws {FileException} If the file cannot be read\n *\n * @example\n * ```typescript\n * const file = new File(\"/path/to/file.txt\");\n * const content = await file.text();\n * console.log(content); // \"Hello, World!\"\n * ```\n */\n public async text(): Promise<string> {\n try {\n return await this.getBunFile().text();\n } catch (error) {\n throw new FileException(`Failed to read file as text: ${this.path}`, {\n path: this.path,\n error: error instanceof Error ? error.message : String(error),\n });\n }\n }\n\n /**\n * Reads and parses the file content as JSON.\n *\n * @typeParam T - The expected type of the parsed JSON\n * @returns A promise that resolves to the parsed JSON object\n * @throws {FileException} If the file cannot be read or parsed\n *\n * @example\n * ```typescript\n * interface Config {\n * name: string;\n * version: number;\n * }\n *\n * const file = new File(\"/path/to/config.json\");\n * const config = await file.json<Config>();\n * console.log(config.name); // \"my-app\"\n * ```\n */\n public async json<T = unknown>(): Promise<T> {\n try {\n return (await this.getBunFile().json()) as T;\n } catch (error) {\n throw new FileException(`Failed to read file as JSON: ${this.path}`, {\n path: this.path,\n error: error instanceof Error ? error.message : String(error),\n });\n }\n }\n\n /**\n * Reads the file content as an ArrayBuffer.\n *\n * @returns A promise that resolves to the file content as an ArrayBuffer\n * @throws {FileException} If the file cannot be read\n *\n * @example\n * ```typescript\n * const file = new File(\"/path/to/binary.bin\");\n * const buffer = await file.arrayBuffer();\n * const view = new DataView(buffer);\n * console.log(view.getInt32(0)); // First 4 bytes as int32\n * ```\n */\n public async arrayBuffer(): Promise<ArrayBuffer> {\n try {\n return await this.getBunFile().arrayBuffer();\n } catch (error) {\n throw new FileException(`Failed to read file as ArrayBuffer: ${this.path}`, {\n path: this.path,\n error: error instanceof Error ? error.message : String(error),\n });\n }\n }\n\n /**\n * Reads the file content as a Uint8Array.\n *\n * @returns A promise that resolves to the file content as a Uint8Array\n * @throws {FileException} If the file cannot be read\n *\n * @example\n * ```typescript\n * const file = new File(\"/path/to/binary.bin\");\n * const bytes = await file.bytes();\n * console.log(bytes[0]); // First byte\n * console.log(bytes.length); // Total bytes\n * ```\n */\n public async bytes(): Promise<Uint8Array> {\n try {\n return await this.getBunFile().bytes();\n } catch (error) {\n throw new FileException(`Failed to read file as Uint8Array: ${this.path}`, {\n path: this.path,\n error: error instanceof Error ? error.message : String(error),\n });\n }\n }\n\n /**\n * Returns a ReadableStream for incremental file reading.\n *\n * @returns A ReadableStream of Uint8Array chunks\n *\n * @example\n * ```typescript\n * const file = new File(\"/path/to/large-file.txt\");\n * const stream = file.stream();\n *\n * for await (const chunk of stream) {\n * console.log(`Received ${chunk.length} bytes`);\n * }\n * ```\n */\n public stream(): ReadableStream<Uint8Array> {\n return this.getBunFile().stream();\n }\n\n /**\n * Returns a ReadableStream for incremental file reading as text.\n *\n * @returns A ReadableStream of string chunks\n *\n * @example\n * ```typescript\n * const file = new File(\"/path/to/large-file.txt\");\n * const stream = file.streamAsText();\n *\n * for await (const chunk of stream) {\n * console.log(`Received text: ${chunk}`);\n * }\n * ```\n */\n public streamAsText(): ReadableStream<string> {\n const byteStream = this.getBunFile().stream();\n const decoder = new TextDecoder();\n\n return new ReadableStream<string>({\n async start(controller) {\n const reader = byteStream.getReader();\n\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n controller.enqueue(decoder.decode(value, { stream: true }));\n }\n controller.close();\n } catch (error) {\n controller.error(error);\n } finally {\n reader.releaseLock();\n }\n },\n });\n }\n\n /**\n * Returns a ReadableStream for incremental JSON parsing from a JSON array file.\n *\n * Reads a file containing a JSON array and streams each parsed element individually.\n * This is useful for processing large JSON array files without loading everything into memory.\n *\n * @typeParam T - The expected type of each JSON element\n * @returns A ReadableStream of parsed JSON elements\n *\n * @example\n * ```typescript\n * // For a file containing: [{\"id\": 1}, {\"id\": 2}, {\"id\": 3}]\n * const file = new File(\"/path/to/data.json\");\n * const stream = file.streamAsJson<{ id: number }>();\n *\n * for await (const item of stream) {\n * console.log(item.id); // 1, 2, 3\n * }\n * ```\n */\n public streamAsJson<T = unknown>(): ReadableStream<T> {\n const byteStream = this.getBunFile().stream();\n const decoder = new TextDecoder();\n let buffer = \"\";\n let depth = 0;\n let inString = false;\n let isEscape = false;\n let objectStart = -1;\n let arrayStarted = false;\n\n return new ReadableStream<T>({\n async start(controller) {\n const reader = byteStream.getReader();\n\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n\n buffer += decoder.decode(value, { stream: true });\n\n let i = 0;\n while (i < buffer.length) {\n const char = buffer[i];\n\n if (isEscape) {\n isEscape = false;\n i++;\n continue;\n }\n\n if (char === \"\\\\\" && inString) {\n isEscape = true;\n i++;\n continue;\n }\n\n if (char === '\"') {\n inString = !inString;\n i++;\n continue;\n }\n\n if (inString) {\n i++;\n continue;\n }\n\n if (char === \"[\" && !arrayStarted) {\n arrayStarted = true;\n i++;\n continue;\n }\n\n if (char === \"{\" || char === \"[\") {\n if (depth === 0) {\n objectStart = i;\n }\n depth++;\n } else if (char === \"}\" || char === \"]\") {\n depth--;\n if (depth === 0 && objectStart !== -1) {\n const jsonStr = buffer.slice(objectStart, i + 1);\n try {\n const parsed = JSON.parse(jsonStr) as T;\n controller.enqueue(parsed);\n } catch {\n // Skip invalid JSON\n }\n buffer = buffer.slice(i + 1);\n i = -1;\n objectStart = -1;\n }\n }\n\n i++;\n }\n }\n controller.close();\n } catch (error) {\n controller.error(error);\n } finally {\n reader.releaseLock();\n }\n },\n });\n }\n\n /**\n * Writes data to the file, overwriting existing content.\n *\n * @param data - The data to write (string, Blob, ArrayBuffer, TypedArray, or Response)\n * @returns A promise that resolves to the number of bytes written\n * @throws {FileException} If the file cannot be written\n *\n * @example\n * ```typescript\n * const file = new File(\"/path/to/file.txt\");\n *\n * // Write string\n * await file.write(\"Hello, World!\");\n *\n * // Write Uint8Array\n * await file.write(new Uint8Array([72, 101, 108, 108, 111]));\n *\n * // Write from Response\n * const response = await fetch(\"https://example.com/data\");\n * await file.write(response);\n * ```\n */\n public async write(data: FileWriteDataType): Promise<number> {\n try {\n return await Bun.write(this.path, data as Parameters<typeof Bun.write>[1]);\n } catch (error) {\n throw new FileException(`Failed to write to file: ${this.path}`, {\n path: this.path,\n error: error instanceof Error ? error.message : String(error),\n });\n }\n }\n\n /**\n * Appends data to the end of the file.\n *\n * @param data - The data to append (string or Uint8Array)\n * @returns A promise that resolves to the total number of bytes in the file\n * @throws {FileException} If the file cannot be appended to\n *\n * @example\n * ```typescript\n * const file = new File(\"/path/to/log.txt\");\n *\n * // Append string\n * await file.append(\"New log entry\\n\");\n *\n * // Append binary data\n * await file.append(new Uint8Array([10, 20, 30]));\n * ```\n */\n public async append(data: string | Uint8Array): Promise<number> {\n try {\n const bunFile = this.getBunFile();\n const fileExists = await bunFile.exists();\n const existingContent = fileExists ? await bunFile.bytes() : new Uint8Array(0);\n\n const newData = typeof data === \"string\" ? new TextEncoder().encode(data) : data;\n\n const combined = new Uint8Array(existingContent.length + newData.length);\n combined.set(existingContent);\n combined.set(newData, existingContent.length);\n\n return await Bun.write(this.path, combined);\n } catch (error) {\n throw new FileException(`Failed to append to file: ${this.path}`, {\n path: this.path,\n error: error instanceof Error ? error.message : String(error),\n });\n }\n }\n\n /**\n * Copies the file to a destination path.\n *\n * @param destination - The destination file path\n * @returns A promise that resolves to a new File instance for the copied file\n * @throws {FileException} If the file cannot be copied\n *\n * @example\n * ```typescript\n * const file = new File(\"/path/to/original.txt\");\n * const copiedFile = await file.copy(\"/path/to/backup.txt\");\n *\n * // The original file is preserved\n * console.log(await file.exists()); // true\n * // Access the copied file\n * console.log(await copiedFile.text()); // same content as original\n * ```\n */\n public async copy(destination: string): Promise<IFile> {\n try {\n await Bun.write(destination, this.getBunFile());\n return new File(destination);\n } catch (error) {\n throw new FileException(`Failed to copy file: ${this.path}`, {\n path: this.path,\n destination,\n error: error instanceof Error ? error.message : String(error),\n });\n }\n }\n\n /**\n * Deletes the file from disk.\n *\n * @throws {FileException} If the file cannot be deleted\n *\n * @example\n * ```typescript\n * const file = new File(\"/path/to/temp.txt\");\n *\n * if (await file.exists()) {\n * await file.delete();\n * console.log(\"File deleted\");\n * }\n * ```\n */\n public async delete(): Promise<void> {\n try {\n await this.getBunFile().delete();\n } catch (error) {\n throw new FileException(`Failed to delete file: ${this.path}`, {\n path: this.path,\n error: error instanceof Error ? error.message : String(error),\n });\n }\n }\n\n /**\n * Downloads a file from a URL and saves it to this file's path.\n *\n * @param url - The URL to download the file from\n * @returns A promise that resolves to the number of bytes written\n * @throws {FileException} If the download or write operation fails\n *\n * @example\n * ```typescript\n * const file = new File(\"/path/to/image.png\");\n *\n * // Download from URL\n * const bytes = await file.download(\"https://example.com/image.png\");\n * console.log(`Downloaded ${bytes} bytes`);\n *\n * // Download with URL object\n * await file.download(new URL(\"https://example.com/data.json\"));\n * ```\n */\n public async download(url: string | URL): Promise<number> {\n try {\n const response = await fetch(url);\n\n if (!response.ok) {\n throw new FileException(`HTTP error: ${response.status} ${response.statusText}`);\n }\n\n return await Bun.write(this.path, response);\n } catch (error) {\n throw new FileException(`Failed to download file from URL: ${url.toString()}`, {\n path: this.path,\n url: url.toString(),\n error: error instanceof Error ? error.message : String(error),\n });\n }\n }\n\n /**\n * Returns a FileSink for incremental writing.\n *\n * @param options - Optional configuration for the writer\n * @returns A FileSink instance for buffered writing\n *\n * @example\n * ```typescript\n * const file = new File(\"/path/to/output.txt\");\n * const writer = file.writer({ highWaterMark: 1024 * 1024 }); // 1MB buffer\n *\n * writer.write(\"Line 1\\n\");\n * writer.write(\"Line 2\\n\");\n * writer.flush(); // Flush buffer to disk\n *\n * writer.write(\"Line 3\\n\");\n * writer.end(); // Flush and close\n * ```\n */\n public writer(options?: FileWriterOptionsType): BunFileSinkType {\n return this.getBunFile().writer(options);\n }\n}\n",
|
|
8
8
|
"import { Exception } from \"@ooneex/exception\";\nimport { HttpStatus } from \"@ooneex/http-status\";\n\nexport class FileException extends Exception {\n constructor(message: string, data: Record<string, unknown> = {}) {\n super(message, {\n status: HttpStatus.Code.InternalServerError,\n data,\n });\n this.name = \"FileException\";\n }\n}\n"
|
|
9
9
|
],
|
|
10
|
-
"mappings": ";;AACA;AACA;AACA,qBAAS,sBAAU,kBAAS;;;ACH5B;AACA;AAAA;AAEO,MAAM,2BAA2B,UAAU;AAAA,EAChD,WAAW,CAAC,SAAiB,OAAgC,CAAC,GAAG;AAAA,IAC/D,MAAM,SAAS;AAAA,MACb,QAAQ,WAAW,KAAK;AAAA,MACxB;AAAA,IACF,CAAC;AAAA,IACD,KAAK,OAAO;AAAA;AAEhB;;;ACXA;;;ACAA,sBAAS;AACT,uBAAS;AAAA;AAEF,MAAM,sBAAsB,WA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W,MAAM,KAAK,KAAK,OAAS,CAAC,EAChE,OAAO,EAAK,EAAc,EAAM,IAAI,EAEtC,OAAO,EAAM,KACd,EAEH,GAAI,GAAS,QAAS,CACpB,IAAM,EAAU,EAAQ,QACxB,EAAW,EAAS,OAAO,CAAC,IAAY,EAAQ,KAAK,CAAO,CAAC,EAG/D,OAAO,EAAS,IAAI,CAAC,IAAY,IAAI,EAAU,EAAK,KAAK,KAAM,CAAO,CAAC,CAAC,EACxE,MAAO,EAAO,CACd,MAAM,IAAI,EAAmB,6CAA6C,KAAK,OAAQ,CACrF,KAAM,KAAK,KACX,MAAO,aAAiB,MAAQ,EAAM,QAAU,OAAO,CAAK,CAC9D,CAAC,GA8BE,EAAE,IAAI,EAA6B,CACxC,OAAO,IAAI,EAAU,EAAK,KAAK,KAAM,GAAG,CAAK,CAAC,OAGlC,cAAa,CAAC,EAAkC,CAC5D,IAAI,EAAY,EACV,EAAU,MAAM,EAAQ,EAAS,CAAE,cAAe,EAAK,CAAC,EAE9D,QAAW,KAAS,EAAS,CAC3B,IAAM,EAAW,EAAK,EAAS,EAAM,IAAI,EACzC,GAAI,EAAM,YAAY,EACpB,GAAa,MAAM,KAAK,cAAc,CAAQ,EACzC,QAAI,EAAM,OAAO,EACtB,GAAa,IAAI,KAAK,CAAQ,EAAE,KAIpC,OAAO,EAEX",
|
|
11
|
+
"debugId": "329F88F8B0F876C764756E2164756E21",
|
|
12
12
|
"names": []
|
|
13
13
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ooneex/fs",
|
|
3
3
|
"description": "File system utilities for reading, writing, and manipulating files and directories with async support and error handling",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.15",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"test": "bun test tests"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@ooneex/exception": "0.0.
|
|
32
|
-
"@ooneex/http-status": "0.0.
|
|
31
|
+
"@ooneex/exception": "0.0.13",
|
|
32
|
+
"@ooneex/http-status": "0.0.13"
|
|
33
33
|
},
|
|
34
34
|
"keywords": [
|
|
35
35
|
"bun",
|