Unified detail views, model
This commit is contained in:
@ -111,6 +111,13 @@ final class FileResource: Item {
|
||||
|
||||
// MARK: File
|
||||
|
||||
func isValid(id: String) -> Bool {
|
||||
!id.isEmpty &&
|
||||
content.isValidIdForFile(id) &&
|
||||
content.isNewIdForFile(id)
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
func update(id newId: String) -> Bool {
|
||||
guard !isExternallyStored else {
|
||||
id = newId
|
||||
|
Reference in New Issue
Block a user