Sobes.tech

// Writes `data` to a file named `file`. func writeData(_ data: Data, to file: String) { let documentDirectoryURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first! let fileURL = documentDirectoryURL.appendingPathComponent(file) try? data.write(to: fileURL) } // Removes file named `file`. func remove(file: String) { let documentDirectoryURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first! let fileURL = documentDirectoryURL.appendingPathComponent(file) try? FileManager.default.removeItem(at: fileURL) } // Reads `Data` from a file named `file`. If the file doesn't exists returns `nil`. func readData(from file: String) -> Data? { let documentDirectoryURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first! let fileURL = documentDirectoryURL.appendingPathComponent(file) return try? Data(contentsOf: fileURL) } final class DiskCache<T>: CacheProtocol { func setValue(_ value: T?, forKey key: String) { } func getValue(forKey key: String) -> T? { } func fetchValue(forKey key: String, completion: @escaping (T?) -> Void) { } }

Middle+
254

How do the processes of inserting data at the beginning and end of a buffer's memory area differ?

Junior — Middle
254

Describe your experience mentoring and supporting colleagues professionally.

Middle — Middle+
254

Is it possible to directly instantiate a protocol object in a programming language?

Junior — Middle
253

Which protocols are typically implemented in Swift to ensure standard contracts and object behavior?

Junior — Middle
253

Explain what Behavior-Driven Development (BDD) methodology is and how it is applied in software development.

Junior — Middle
253

How can DispatchGroup be used to sequentially execute requests with the ability to cancel on the third without waiting for the fourth?

253

What processes and stages are initiated when launching a software application?

Junior — Middle
253

What rule determines the accessibility of an Open Class, whether it is public or private?

Junior — Middle
253

What methods can you use to improve the performance of interface rendering on the screen?

Junior — Middle
253

In what order do constructors and initializers execute when creating an instance of a class?

Junior — Middle
253

How many times is the loadView method called in the lifecycle of UIViewController?

Junior — Middle
253

Which has a greater importance: highPriorityGesture or simultaneousGesture?

Junior — Middle
253

Should data type be considered when choosing what to cache?

Junior — Middle
253

How do you imagine the most suitable professional environment and working conditions for yourself?

Intern — Junior
253

Can you explain what URL means and what its main function on the internet is?

Junior — Middle
252

What are the advantages and disadvantages of using the objectWillChange.send method in data model update architecture?

Junior — Middle
252

Tell me about one of your achievements or projects that you are particularly proud of

Junior — Middle
252

What is the role of the SceneDelegate class in the application lifecycle?

Junior — Middle
252
/188