Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

401
Vistas
How to change file extension using swift?

I'm using swift code but is not changed file extension.

This my swift code

let url = NSURL(fileURLWithPath: outputURL.path).deletingPathExtension?.appendingPathExtension("mp3")
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You are just creating a URL and then changing that URL. You are not actually operating on any file.

To rename a file, call FileManager.default.moveItem(at:to:). Pass the file URL as the first argument, and the file URL with the new name as the second argument.

let newURL = outputURL.deletingPathExtension().appendingPathExtension("mp3")
try FileManager.default.moveItem(at: outputURL, to: newURL)
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda