What does 'fileprivate' keyword means in Swift? [duplicate] What does 'fileprivate' keyword means in Swift? [duplicate] swift swift

What does 'fileprivate' keyword means in Swift? [duplicate]


fileprivate is one of the new Swift 3 access modifiers that replaces private in its meaning. fileprivate defines an entity (class, extension, property, ...) as private to everybody outside the source file it is declared in, but accessible to all entities in that source file.

private restricts the entity in the direct enclosing scope.