setVolumeName(_:replyHandler:)
Sets a new name for the volume.
Declaration
func setVolumeName(_ name: FSFileName, replyHandler reply: @escaping @Sendable (FSFileName?, (any Error)?) -> Void)func setVolumeName(_ name: FSFileName) async throws -> FSFileNameParameters
- name:
The new volume name.
- reply:
A block or closure to indicate success or failure. If renaming succeeds, pass an Fsfilename of the new volume name and a
nilerror. If renaming fails, pass the relevant error as the second parameter; FSKit ignores any Fsfilename in this case. For anasyncSwift implementation, there’s no reply handler; simply return the Fsfilename or throw an error.