gets better
This commit is contained in:
@@ -47,7 +47,7 @@ type SharedStatus = {
|
|||||||
outdated: boolean
|
outdated: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class Extension<Status>{
|
abstract class Extension<Status extends SharedStatus>{
|
||||||
constructor(
|
constructor(
|
||||||
protected name: string
|
protected name: string
|
||||||
){}
|
){}
|
||||||
@@ -121,9 +121,15 @@ export abstract class FSExtension extends Extension<FSStatus>{
|
|||||||
}
|
}
|
||||||
return status
|
return status
|
||||||
}
|
}
|
||||||
|
|
||||||
public async isEmpty(): Promise<boolean>{
|
public async isEmpty(): Promise<boolean>{
|
||||||
return true //TODO
|
if (!this.exists) return false
|
||||||
|
else {
|
||||||
|
const files = await fs.readdir(this.prefix)
|
||||||
|
return files.length === 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async exists(): Promise<boolean>{
|
public async exists(): Promise<boolean>{
|
||||||
try {
|
try {
|
||||||
await fs.access(path.resolve(this.prefix, this.name))
|
await fs.access(path.resolve(this.prefix, this.name))
|
||||||
|
|||||||
Reference in New Issue
Block a user