how to display power point file and word file in flutter after getting file path - flutter

I listed all docx and pptx files from device storage now I want to open them using file path I tried different packages but I am getting a lot of issues can someone provide me a material related to opening document files or any package that can open files using file path thanks

You can try this package, it will open the files in default application from its path.
https://pub.dev/packages/open_file_plus
https://pub.dev/packages/open_file_plus

Related

Flutter Dart File path

quick Flutter Dart issue.
I am trying to read from a text file located inside the app's directory, however Flutter does not recognize a single file path that I provide it. The file path is always responded to with "OS Error: No such file or directory, errno = 2".
I am trying to read from a file located in assets/importfiles, from a dart class inside lib/viewmodels. The assets directory has already been added to pubsec.yaml.
Here is the picture of my directory structure
I can even have the main class locate and print out the files' paths using rootBundle, but trying to initialize a new File using those paths provides the same error text.
If I were to use path provider to locate and read from files, how would I initially put the files into the Temporary Directory or Application Documents Directory, if Flutter does not recognize the file paths of the files that I want to insert?
Just You need to remove folder name ''.
assets\importfiles
to
assets Or importfiles
Thanks You.Happy To help you
Have you tried putting a "/" before "assets" in the file path?
I'm not sure that this will fix the error, let me know if it works!

vscode: Where stores the session data (restored opened files)? Is that possible to use relative path?

If I use vscode to open a directory and then opened some files and quit, vscode will reopen all the files at the next time when it launches.
But there is a problem. It seems vscode is not using relative path for storing this info and does not store this info inside the project directory. So if I move the directory or rename it, and then open the directory again, for example code projectNewName/, my previous session (opened files/opened editors) are lost. I have no idea where this session data stores and if it is possible to configure it to store relative path and save the session file inside the project directory, for example, project/.vscode or project/.vscode/session. If the opened editors session is stored inside a project directory, it will be restored regardless where the directory is and what the directory name is.
TL;DR: currently, configuration of this path is not supported.
VSCode stores the states for all the workspaces, in its global config folder under /Code/User/workspaceStorage/. See the path to the settings.json in this help paragraph for your OS and then just replace the end of the path. For Windows, for example, the settings path is %APPDATA%\Code\User\settings.json, so the state storage is
%APPDATA%/Code/User/workspaceStorage/
In this directory, there are many subdirectories with some hex names. Please, refer to my another answer for a python script to browse it. Each folder contains a workspace.json with mostly data only referring to the path of the workspace. There are also state.vscdb files in these directories. These are sqlite databases with only one table:
CREATE TABLE ItemTable (key TEXT UNIQUE ON CONFLICT REPLACE, value BLOB);
It is used as a key|value storage for all the state variables like:
workbench.panel.output|{"workbench.panel.output":{"collapsed":false,"isHidden":true}}
As far as I see from VSCode source, currently only a global path from the environment is used to locate this file:
this.environmentService.workspaceStorageHome
this.environmentService.globalStorageHome
which resolves to
get workspaceStorageHome(): URI { return URI.joinPath(this.appSettingsHome, 'workspaceStorage'); }
get globalStorageHome(): URI { return URI.joinPath(this.appSettingsHome, 'globalStorage'); }
So, it seems there are currently no options to customize it from the settings.json.

How to read and write text files from appengine?

I am using eclipse Luna. I want to read and write text files from my appengine and the path of those files I will set on run time from the local host, like "C:\Users\Public\Documents\newfile.txt" . Anyone give me a good code or link or a direction how to resolve this.
You cannot write to file system in AppEngine but you can use CloudStorage https://cloud.google.com/appengine/docs/standard/java/googlecloudstorageclient/read-write-to-cloud-storage. Duplicate of Does Google App Engine allow creation of files and folders on the server?

Change .vscode folder location

I'm programming a client side applications using SharePoint Designer 2013.
I want to change to VSCODE since it supports a lot of extensions for some Javascript library like angular, jQuery. And because of the Chrome/Node.js debugger extension.
But when I try to start any Debugger, I got the error:
Unable to create 'launch.json' file inside the '.vscode' folder (Error: UNKNOWN: unknown error, mkdir '\\servername\DavWWWRoot\sitename\Style Library\.vscode').
I get this error because it's impossible to create a folder in SharePoint where the name starts with dot.
So there's a possibility to change the name of this folder or the file location to any directory in my local computer?
No, it's not possible to move/rename that folder. VS code is a tool that bases project management on folder content. So it is essential that the project settings reside in the folder being managed.
You can move the "extensions" folder, but unfortunately not the argv.json (so the ".vscode" will, at least be recreated on vscode launch)
https://github.com/microsoft/vscode/issues/17691#issuecomment-559234574
I hope that'll finally change sometime .
https://github.com/microsoft/vscode/issues/3884
https://github.com/OmniSharp/omnisharp-roslyn/issues/953

open and read zip file from chrome-app

Now that google chrome handles zip files, basically, is there a way from inside a chrome app to get the files, and the contents of the files in a zip archive? From the user end, a zip file is mounted as a drive, containing the contents, but from the app end, the zip file is just a file. Is there a way from the app to "mount" the file, get the mount point and enumerate the contents and inflate them?
Nope, there are no particular APIs exposed that would allow this.
You will need to include your own ZIP engine - be it in JavaScript or in (P)NaCl. Then you can work with HTML Filesystem to hold inflated files while you work with them.