Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fanotify backend #180

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
AccessModifierOffset: -2
AlignAfterOpenBracket: DontAlign
AllowShortFunctionsOnASingleLine: None
BasedOnStyle: LLVM
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterStruct: false
AfterUnion: false
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
BeforeWhile: true
BreakBeforeBraces: Custom
ColumnLimit: 140
Cpp11BracedListStyle: false
FixNamespaceComments: true
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 2
MaxEmptyLinesToKeep: 2
NamespaceIndentation: All
PointerAlignment: Right
SortIncludes: false
SortUsingDeclarations: false
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
TabWidth: 2
UseTab: false
AlignOperands: true
AllowShortBlocksOnASingleLine: Never
AllowShortIfStatementsOnASingleLine: Never
BinPackArguments: false
BinPackParameters: false
BreakConstructorInitializers: BeforeComma
BreakBeforeTernaryOperators: true
ContinuationIndentWidth: 2
BreakStringLiterals: false
AllowAllArgumentsOnNextLine: true
AlwaysBreakBeforeMultilineStrings: true
8 changes: 7 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,10 @@ trim_trailing_whitespace = true

[*.md]
max_line_length = 0
trim_trailing_whitespace = false
trim_trailing_whitespace = false

[*.{c++,cc,cpp,cxx,h,h++,hh,hpp,hxx,inl,ipp,tlh,tli}]
cpp_new_line_before_open_brace_type = same_line
cpp_new_line_before_open_brace_namespace = same_line
cpp_new_line_before_open_brace_function = same_line
cpp_new_line_before_open_brace_block = same_line
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* text=auto

*.cc text
*.hh text
*.js text
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ stress-test
crash.log
test/snapshot.txt
npm
test/fanotify/
test/ll.1.mv.up
2 changes: 2 additions & 0 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@
"src/watchman/WatchmanBackend.cc",
"src/shared/BruteForceBackend.cc",
"src/linux/InotifyBackend.cc",
"src/linux/FAnotifyCrawlBackend.cc",
"src/unix/legacy.cc"
],
"defines": [
"WATCHMAN",
"INOTIFY",
"FANOTIFY_CRAWL",
"BRUTE_FORCE"
]
}],
Expand Down
10 changes: 6 additions & 4 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ declare type FilePath = string;
declare type GlobPattern = string;

declare namespace ParcelWatcher {
export type BackendType =
export type BackendType =
| 'fs-events'
| 'watchman'
| 'inotify'
| 'windows'
| 'brute-force';
export type EventType = 'create' | 'update' | 'delete';
| 'brute-force'
| 'fanotify-crawl'
;
export type EventType = 'create' | 'update' | 'delete' | 'move';
export interface Options {
ignore?: (FilePath|GlobPattern)[];
backend?: BackendType;
Expand Down Expand Up @@ -46,4 +48,4 @@ declare namespace ParcelWatcher {
): Promise<FilePath>;
}

export = ParcelWatcher;
export = ParcelWatcher;
Loading