D
D
Dima Grib2021-05-12 15:11:16
User interface
Dima Grib, 2021-05-12 15:11:16

How to add an extension to a file before saving?

Greetings
I would be grateful for your ideas

There is such a wonderful Data extension that downloads the file

extension Data {
     func append(fileURL: URL) throws {
         if let fileHandle = FileHandle(forWritingAtPath: fileURL.path) {
             defer {
                 fileHandle.closeFile()
             }
             fileHandle.seekToEndOfFile()
             fileHandle.write(self)
         }
         else {
             try write(to: fileURL, options: .atomic)
         }
     }
 }


How to add .mp4 extension to file before saving?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
M
McBernar, 2018-11-09
@McBernar

There is no such style. It's just a hodgepodge of purple gradient and background images. Pretty mediocre, by the way.
Well, on top is content, the style of which, apparently, is inspired by cinematic ideas about the interfaces of the future. In any science fiction film, such goodness in bulk.
If you want to find something similar:
1. Upload the image to Google Image and look for similar ones
2. Go to pinterest and type in dark web ui or something like that - then you can play with the suggested queries

J
joginzbajin, 2018-11-09
@joginzbajin

Maybe an infographic would work?

B
bogette, 2018-11-09
@bogette

Watch and create something similar. How to understand the question: "how to create"?

I
Ivan Vorobei, 2021-05-12
@ivanvorobei

In the line
try write(to: fileURL, options: .atomic)
Try to change the URL , add a puff with the name and extension of the file.

B
briahas, 2021-05-12
@briahas

fileURL
should already contain the extension. Need to change? - change his extension and - bingo.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question