Contents

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 -> FSFileName

Parameters

  • 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 nil error. If renaming fails, pass the relevant error as the second parameter; FSKit ignores any Fsfilename in this case. For an async Swift implementation, there’s no reply handler; simply return the Fsfilename or throw an error.