-
|
Good afternoon. Could you tell me how to read and write files using this template? If it's possible, of course. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
|
Hey @ENNA-Egor! it could be easily done via creating a new conveyor There are some related examples in the conveyor README, see if that helps. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you. |
Beta Was this translation helpful? Give feedback.
-
|
I built the application according to the README recommendations. app-api.ts looks like this: I connected the Conveyor to the element like this: But I get an error: |
Beta Was this translation helpful? Give feedback.
-
|
I found the error. But I still have one question. How do I redirect |
Beta Was this translation helpful? Give feedback.
-
|
Not really sure about why you’d use If you need the project’s root directory path in both dev and production (bundled) environments under the renderer process (app), you’ll have to expose it through a Conveyor API + handler or IPC call. import { app } from 'electron';
// it can be used in some Conveyor API handler which lets you write the file in the project root
const appRootPath = app.getAppPath(); |
Beta Was this translation helpful? Give feedback.
Not really sure about why you’d use
__dirnamein the renderer process - it won’t work by default sincenodeIntegrationandcontextIsolationprevent Node modules from being exposed there (for security reasons).If you need the project’s root directory path in both dev and production (bundled) environments under the renderer process (app), you’ll have to expose it through a Conveyor API + handler or IPC call.