Implement fs.stat and fs.readlink
Summary: Fixes issue for the stackTraceMapper Reviewed By: aigoncharov Differential Revision: D32987161 fbshipit-source-id: 660f49a1bdf61b2fd2963874ef23dfd284f71128
This commit is contained in:
committed by
Facebook GitHub Bot
parent
af83523798
commit
34a1da3345
@@ -132,6 +132,21 @@ export type IOSDeviceParams = {
|
||||
state?: string;
|
||||
};
|
||||
|
||||
// Serializable subset of StatsBase from fs.d.ts
|
||||
export interface FSStatsLike {
|
||||
isFile: boolean;
|
||||
isDirectory: boolean;
|
||||
isSymbolicLink: boolean;
|
||||
mode: number;
|
||||
uid: number;
|
||||
gid: number;
|
||||
size: number;
|
||||
atimeMs: number;
|
||||
mtimeMs: number;
|
||||
ctimeMs: number;
|
||||
birthtimeMs: number;
|
||||
}
|
||||
|
||||
export type FlipperServerCommands = {
|
||||
'node-api-fs-access': (path: string, mode?: number) => Promise<void>;
|
||||
'node-api-fs-pathExists': (path: string, mode?: number) => Promise<boolean>;
|
||||
@@ -146,6 +161,8 @@ export type FlipperServerCommands = {
|
||||
dest: string,
|
||||
flags?: number,
|
||||
) => Promise<void>;
|
||||
'node-api-fs-stat': (path: string) => Promise<FSStatsLike>;
|
||||
'node-api-fs-readlink': (path: string) => Promise<string>;
|
||||
/**
|
||||
* @throws ExecError
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user