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:
Michel Weststrate
2021-12-13 05:46:42 -08:00
committed by Facebook GitHub Bot
parent af83523798
commit 34a1da3345
5 changed files with 47 additions and 2 deletions

View File

@@ -24,6 +24,7 @@ import {
RmOptions,
fsConstants,
EnvironmentInfo,
FSStatsLike,
} from 'flipper-common';
export type FileEncoding = 'utf-8' | 'base64';
@@ -49,6 +50,7 @@ export type RemoteServerContext = {
): Promise<ExecOut<string>>;
};
fs: {
constants: typeof fsConstants;
access(path: string, mode?: number): Promise<void>;
pathExists(path: string, mode?: number): Promise<boolean>;
unlink(path: string): Promise<void>;
@@ -62,7 +64,8 @@ export type RemoteServerContext = {
): Promise<void>;
rm(path: string, options?: RmOptions): Promise<void>;
copyFile(src: string, dest: string, flags?: number): Promise<void>;
constants: typeof fsConstants;
stat(path: string): Promise<FSStatsLike>;
readlink(path: string): Promise<string>;
};
downloadFile(
url: string,