mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-20 02:18:01 +00:00
cleanup
This commit is contained in:
@@ -22,7 +22,6 @@ export interface MessageBoxResult {
|
|||||||
|
|
||||||
export abstract class FileTransfer {
|
export abstract class FileTransfer {
|
||||||
abstract getName (): string
|
abstract getName (): string
|
||||||
abstract getRelativePath (): string | null
|
|
||||||
abstract getMode (): number
|
abstract getMode (): number
|
||||||
abstract getSize (): number
|
abstract getSize (): number
|
||||||
abstract close (): void
|
abstract close (): void
|
||||||
@@ -244,7 +243,7 @@ export class HTMLFileUpload extends FileUpload {
|
|||||||
private stream: ReadableStream
|
private stream: ReadableStream
|
||||||
private reader: ReadableStreamDefaultReader
|
private reader: ReadableStreamDefaultReader
|
||||||
|
|
||||||
constructor (private file: File, private relativePath: string|null = null) {
|
constructor (private file: File) {
|
||||||
super()
|
super()
|
||||||
this.stream = this.file.stream()
|
this.stream = this.file.stream()
|
||||||
this.reader = this.stream.getReader()
|
this.reader = this.stream.getReader()
|
||||||
@@ -254,10 +253,6 @@ export class HTMLFileUpload extends FileUpload {
|
|||||||
return this.file.name
|
return this.file.name
|
||||||
}
|
}
|
||||||
|
|
||||||
getRelativePath (): string|null {
|
|
||||||
return this.relativePath
|
|
||||||
}
|
|
||||||
|
|
||||||
getMode (): number {
|
getMode (): number {
|
||||||
return 0o644
|
return 0o644
|
||||||
}
|
}
|
||||||
|
@@ -303,7 +303,7 @@ class ElectronFileUpload extends FileUpload {
|
|||||||
private buffer: Buffer
|
private buffer: Buffer
|
||||||
private powerSaveBlocker = 0
|
private powerSaveBlocker = 0
|
||||||
|
|
||||||
constructor (private filePath: string, private electron: ElectronService, private relativePath: string|null = null ) {
|
constructor (private filePath: string, private electron: ElectronService) {
|
||||||
super()
|
super()
|
||||||
this.buffer = Buffer.alloc(256 * 1024)
|
this.buffer = Buffer.alloc(256 * 1024)
|
||||||
this.powerSaveBlocker = electron.powerSaveBlocker.start('prevent-app-suspension')
|
this.powerSaveBlocker = electron.powerSaveBlocker.start('prevent-app-suspension')
|
||||||
@@ -320,10 +320,6 @@ class ElectronFileUpload extends FileUpload {
|
|||||||
return path.basename(this.filePath)
|
return path.basename(this.filePath)
|
||||||
}
|
}
|
||||||
|
|
||||||
getRelativePath (): string|null {
|
|
||||||
return this.relativePath
|
|
||||||
}
|
|
||||||
|
|
||||||
getMode (): number {
|
getMode (): number {
|
||||||
return this.mode
|
return this.mode
|
||||||
}
|
}
|
||||||
@@ -366,10 +362,6 @@ class ElectronFileDownload extends FileDownload {
|
|||||||
return path.basename(this.filePath)
|
return path.basename(this.filePath)
|
||||||
}
|
}
|
||||||
|
|
||||||
getRelativePath (): null {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
getMode (): number {
|
getMode (): number {
|
||||||
return this.mode
|
return this.mode
|
||||||
}
|
}
|
||||||
|
@@ -155,7 +155,6 @@ class HTMLFileDownload extends FileDownload {
|
|||||||
private name: string,
|
private name: string,
|
||||||
private mode: number,
|
private mode: number,
|
||||||
private size: number,
|
private size: number,
|
||||||
private relativePath: string|null = null,
|
|
||||||
) {
|
) {
|
||||||
super()
|
super()
|
||||||
}
|
}
|
||||||
@@ -164,10 +163,6 @@ class HTMLFileDownload extends FileDownload {
|
|||||||
return this.name
|
return this.name
|
||||||
}
|
}
|
||||||
|
|
||||||
getRelativePath (): string|null {
|
|
||||||
return this.relativePath
|
|
||||||
}
|
|
||||||
|
|
||||||
getMode (): number {
|
getMode (): number {
|
||||||
return this.mode
|
return this.mode
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user