Files
Kisani/Core/Protocols/NASTransferProtocol.swift
Robin Kutesa b96711c535 Initial scaffold — NASBackup iOS app
Full project scaffold: XcodeGen project.yml, Core models/protocols/errors,
SMBService (kishikawakatsumi/SMBClient), SFTPService (Citadel 0.9.2),
PhotoLibraryService, LANMonitor, BackupEngine, BackgroundTaskManager,
all feature UIs (Login, Connect, Browse, Backup, History, Settings),
Shared components and theme. Builds clean with zero errors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 17:05:04 +03:00

26 lines
707 B
Swift

import Foundation
struct NASItem: Identifiable {
let id = UUID()
let name: String
let path: String
let isDirectory: Bool
let size: Int64
let modifiedDate: Date?
}
protocol NASTransferProtocol: AnyObject {
var isConnected: Bool { get }
func connect(to host: String, port: Int, username: String, password: String) async throws
func disconnect()
func listDirectory(at path: String) async throws -> [NASItem]
func createDirectory(at path: String) async throws
func fileExists(at remotePath: String) async throws -> Bool
func upload(
localURL: URL,
remotePath: String,
progress: @escaping (Int64, Int64) -> Void
) async throws
}