Having issues with an import statement "FileSystem"

import { FileSystem } from '@theia/filesystem/lib/common';
this line is giving me an error that Module ‘"@theia/filesystem/lib/common"’ has no exported member ‘FileSystem’.
Now, I know FileSystem is deprecated but I’m not able to find not fixes.
I’m very new to this community.

@UditDe thank you for the discussion, as you’ve pointed out FileSystem no longer exists (it has been deprecated for a while now). Instead you can follow what the changelog stated (https://github.com/eclipse-theia/theia/blob/master/doc/changelogs/CHANGELOG-2020.md#breaking_changes_1.5.0):

  • [filesystem] FileSystem and FileSystemWatcher services are deprecated #7908
    • On the backend there is no more FileSystem implementation. One has to use Node.js APIs instead.
    • On the frontend, the FileService should be used instead. It was ported from VS Code for compatibility with VS Code extensions.
    • On the frontend, the EnvVariableServer should be used instead to access the current user home and available drives.
2 Likes

Thanks For your reply. Could you please show me an example of any working API that is used to replace the “fileSystem”?
Could You please let me know how does the “fileSystem” work? Actually, I am handling an old code base.

@UditDe as the previous comment mentioned, if you need filesystem utilities in the frontend for example you would use the file-service (api docs).

Could You please let me know how does the “fileSystem” work? Actually, I am handling an old code base.

I’m not sure I follow, can you be more specific? What are you trying to achieve?