@tauri-apps/plugin-fs
Advanced tools
Comparing version 2.0.0-alpha.6 to 2.0.0-beta.0
@@ -740,4 +740,4 @@ /** | ||
*/ | ||
type RawEvent = { | ||
type: RawEventKind; | ||
type WatchEvent = { | ||
type: WatchEventKind; | ||
paths: string[]; | ||
@@ -749,10 +749,10 @@ attrs: unknown; | ||
*/ | ||
type RawEventKind = "any " | { | ||
access?: unknown; | ||
type WatchEventKind = "any" | { | ||
access: WatchEventKindAccess; | ||
} | { | ||
create?: unknown; | ||
create: WatchEventKindCreate; | ||
} | { | ||
modify?: unknown; | ||
modify: WatchEventKindModify; | ||
} | { | ||
remove?: unknown; | ||
remove: WatchEventKindRemove; | ||
} | "other"; | ||
@@ -762,12 +762,57 @@ /** | ||
*/ | ||
type DebouncedEvent = { | ||
kind: "Any"; | ||
path: string; | ||
}[] | { | ||
kind: "AnyContinuous"; | ||
path: string; | ||
}[]; | ||
type WatchEventKindAccess = { | ||
kind: "any"; | ||
} | { | ||
kind: "close"; | ||
mode: "any" | "execute" | "read" | "write" | "other"; | ||
} | { | ||
kind: "open"; | ||
mode: "any" | "execute" | "read" | "write" | "other"; | ||
} | { | ||
kind: "other"; | ||
}; | ||
/** | ||
* @since 2.0.0 | ||
*/ | ||
type WatchEventKindCreate = { | ||
kind: "any"; | ||
} | { | ||
kind: "file"; | ||
} | { | ||
kind: "folder"; | ||
} | { | ||
kind: "other"; | ||
}; | ||
/** | ||
* @since 2.0.0 | ||
*/ | ||
type WatchEventKindModify = { | ||
kind: "any"; | ||
} | { | ||
kind: "data"; | ||
mode: "any" | "size" | "content" | "other"; | ||
} | { | ||
kind: "metadata"; | ||
mode: "any" | "access-time" | "write-time" | "permissions" | "ownership" | "extended" | "other"; | ||
} | { | ||
kind: "name"; | ||
mode: "any" | "to" | "from" | "both" | "other"; | ||
} | { | ||
kind: "other"; | ||
}; | ||
/** | ||
* @since 2.0.0 | ||
*/ | ||
type WatchEventKindRemove = { | ||
kind: "any"; | ||
} | { | ||
kind: "file"; | ||
} | { | ||
kind: "folder"; | ||
} | { | ||
kind: "other"; | ||
}; | ||
/** | ||
* @since 2.0.0 | ||
*/ | ||
type UnwatchFn = () => void; | ||
@@ -779,3 +824,3 @@ /** | ||
*/ | ||
declare function watch(paths: string | string[] | URL | URL[], cb: (event: DebouncedEvent) => void, options?: DebouncedWatchOptions): Promise<UnwatchFn>; | ||
declare function watch(paths: string | string[] | URL | URL[], cb: (event: WatchEvent) => void, options?: DebouncedWatchOptions): Promise<UnwatchFn>; | ||
/** | ||
@@ -786,4 +831,4 @@ * Watch changes on files or directories. | ||
*/ | ||
declare function watchImmediate(paths: string | string[] | URL | URL[], cb: (event: RawEvent) => void, options?: WatchOptions): Promise<UnwatchFn>; | ||
export type { CreateOptions, OpenOptions, CopyFileOptions, MkdirOptions, DirEntry, ReadDirOptions, ReadFileOptions, RemoveOptions, RenameOptions, StatOptions, TruncateOptions, WriteFileOptions, ExistsOptions, FileInfo, WatchOptions, DebouncedWatchOptions, DebouncedEvent, RawEvent, UnwatchFn, }; | ||
declare function watchImmediate(paths: string | string[] | URL | URL[], cb: (event: WatchEvent) => void, options?: WatchOptions): Promise<UnwatchFn>; | ||
export type { CreateOptions, OpenOptions, CopyFileOptions, MkdirOptions, DirEntry, ReadDirOptions, ReadFileOptions, RemoveOptions, RenameOptions, StatOptions, TruncateOptions, WriteFileOptions, ExistsOptions, FileInfo, WatchOptions, DebouncedWatchOptions, WatchEvent, WatchEventKind, WatchEventKindAccess, WatchEventKindCreate, WatchEventKindModify, WatchEventKindRemove, UnwatchFn, }; | ||
export { BaseDirectory, FileHandle, create, open, copyFile, mkdir, readDir, readFile, readTextFile, readTextFileLines, remove, rename, SeekMode, stat, lstat, truncate, writeFile, writeTextFile, exists, watch, watchImmediate, }; |
{ | ||
"name": "@tauri-apps/plugin-fs", | ||
"version": "2.0.0-alpha.6", | ||
"version": "2.0.0-beta.0", | ||
"description": "Access the file system.", | ||
@@ -24,3 +24,3 @@ "license": "MIT or APACHE-2.0", | ||
"dependencies": { | ||
"@tauri-apps/api": "2.0.0-alpha.13" | ||
"@tauri-apps/api": "2.0.0-beta.0" | ||
}, | ||
@@ -27,0 +27,0 @@ "scripts": { |
@@ -21,3 +21,3 @@ ![plugin-fs](https://github.com/tauri-apps/plugins-workspace/raw/v2/plugins/fs/banner.png) | ||
[dependencies] | ||
tauri-plugin-fs = "2.0.0-alpha" | ||
tauri-plugin-fs = "2.0.0-beta" | ||
# alternatively with Git: | ||
@@ -24,0 +24,0 @@ tauri-plugin-fs = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
108971
2970
+ Added@tauri-apps/api@2.0.0-beta.0(transitive)
- Removed@tauri-apps/api@2.0.0-alpha.13(transitive)
Updated@tauri-apps/api@2.0.0-beta.0