File tree 4 files changed +13
-12
lines changed 4 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ disabled_rules:
6
6
- cyclomatic_complexity
7
7
- variable_name
8
8
- type_name
9
+ - todo
9
10
10
11
shorthand_operator : warning
11
12
superfluous_disable_command : warning
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ open class DispatchFileSystemWatcher {
145
145
// MARK: - Deinitialization
146
146
147
147
deinit {
148
- //print("\(path): Deinit")
148
+ // print("\(path): Deinit")
149
149
close ( )
150
150
}
151
151
@@ -217,7 +217,7 @@ open class DispatchFileSystemWatcher {
217
217
// stop watching when path created
218
218
if self ? . path. isRegular == true || self ? . path. isDirectoryFile == true {
219
219
self ? . dispatchDelegate ( . Create)
220
- //self.delegate?.fsWatcherDidObserveCreate(self)
220
+ // self.delegate?.fsWatcherDidObserveCreate(self)
221
221
self ? . createWatcher = nil
222
222
self ? . startWatching ( )
223
223
watch. stopWatching ( )
@@ -245,13 +245,13 @@ open class DispatchFileSystemWatcher {
245
245
}
246
246
247
247
// Define the block to call when a file change is detected.
248
- source!. setEventHandler { //[unowned self] () in
248
+ source!. setEventHandler { // [unowned self] () in
249
249
let eventType = DispatchFileSystemEvents ( rawValue: self . source!. data)
250
250
self . dispatchDelegate ( eventType)
251
251
}
252
252
253
253
// Define a cancel handler to ensure the path is closed when the source is cancelled.
254
- source!. setCancelHandler { //[unowned self] () in
254
+ source!. setCancelHandler { // [unowned self] () in
255
255
_ = Darwin . close ( self . fileDescriptor)
256
256
self . fileDescriptor = - 1
257
257
self . source = nil
Original file line number Diff line number Diff line change @@ -35,13 +35,13 @@ public class FileSystemWatcher {
35
35
// MARK: - Private Static Properties
36
36
37
37
/// The event stream callback for when events occur.
38
- private static let _eventCallback : FSEventStreamCallback = {
38
+ private static let _eventCallback : FSEventStreamCallback = { // swiftlint:disable all
39
39
( stream: ConstFSEventStreamRef ,
40
- contextInfo: UnsafeMutableRawPointer ? ,
41
- numEvents: Int ,
42
- eventPaths: UnsafeMutableRawPointer ,
43
- eventFlags: UnsafePointer < FSEventStreamEventFlags > ,
44
- eventIds: UnsafePointer < FSEventStreamEventId > ) in
40
+ contextInfo: UnsafeMutableRawPointer ? ,
41
+ numEvents: Int ,
42
+ eventPaths: UnsafeMutableRawPointer ,
43
+ eventFlags: UnsafePointer < FSEventStreamEventFlags > ,
44
+ eventIds: UnsafePointer < FSEventStreamEventId > ) in // swiftlint:enable all
45
45
46
46
FileSystemWatcher . log ( " Callback Fired " )
47
47
Original file line number Diff line number Diff line change @@ -70,9 +70,9 @@ public struct Path {
70
70
weak var delegate : FileManagerDelegate ?
71
71
/// Safe way to use fileManager
72
72
var fileManager : FileManager {
73
- //if delegate == nil {
73
+ // if delegate == nil {
74
74
// print("\n\nDelegate is nil\n\n")
75
- //}
75
+ // }
76
76
unsafeFileManager. delegate = delegate
77
77
return unsafeFileManager
78
78
}
You can’t perform that action at this time.
0 commit comments