This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import RAPCore | |
struct Storage { | |
static let saveDir: URL = FileManager.default.homeDirectoryForCurrentUser.appendingPathComponent("jsondb") | |
static func verify() { | |
let audioFiles = try! FileManager.default.contentsOfDirectory(at: URL(fileURLWithPath: "/dir/to/cafs"), includingPropertiesForKeys: nil, options: FileManager.DirectoryEnumerationOptions.skipsHiddenFiles) | |
.filter { $0.pathExtension == "caf" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TriangleView(context: Context?, attrs: AttributeSet?) : View(context, attrs) { | |
val paint = Paint() | |
val path = Path() | |
override fun onDraw(canvas: Canvas?) { | |
super.onDraw(canvas) | |
canvas ?: return | |
canvas.drawPath(configurePath(canvas.width.toFloat(), path), configurePaint(paint)) | |
} |