426
Views
6
Comments
Saving temporary file

Is there any way to save (create and save) temporary file in personal environment ?

I know that I can create temporary file by Filesystem.Path_GetTemporaryFileName but my libarary cannot write to already opened file.



2018-05-16 11-16-36
João Heleno
 
MVP

@KJ

What exactly are you trying to do? Are you using some component from the OutSystems Forge?
Can you tell us more about it?

Thanks

JH

UserImage.jpg
kj5d

João Heleno wrote:

@KJ

What exactly are you trying to do? Are you using some component from the OutSystems Forge?
Can you tell us more about it?

Thanks

JH

I am trying to integrate with external .net library.

I have it already in extension.

Its object has save (tofile) method which I am calling - passing as a parameter path extracted from Filesystem.Path_GetTemporaryFileName.

I get an error message (see attachment) and I thought that it is permission issue


Capture.PNG
2020-07-21 19-28-50
Rajat Agrawal
Champion

K J wrote:

Is there any way to save (create and save) temporary file in personal environment ?

I know that I can create temporary file by Filesystem.Path_GetTemporaryFileName but my libarary cannot write to already opened file.



Hi Kj,

You can outsystem inbuild features to save file in personal environment like first you need to get path of directory via get_directory function then tou need to add folder name then use save file action. All built function you will find in filesystem, system in manage dependencies.. Ignore the typo mistake because posting from mobile.


Thanks,

Rajat



UserImage.jpg
kj5d

Rajat Agrawal wrote:

K J wrote:

Is there any way to save (create and save) temporary file in personal environment ?

I know that I can create temporary file by Filesystem.Path_GetTemporaryFileName but my libarary cannot write to already opened file.



Hi Kj,

You can outsystem inbuild features to save file in personal environment like first you need to get path of directory via get_directory function then tou need to add folder name then use save file action. All built function you will find in filesystem, system in manage dependencies.. Ignore the typo mistake because posting from mobile.


Thanks,

Rajat



That is exactly what I did. I was getting errors and I thought it is permission issue. But maybe it is issue with my library.


2020-07-21 19-28-50
Rajat Agrawal
Champion

K J wrote:

Rajat Agrawal wrote:

K J wrote:

Is there any way to save (create and save) temporary file in personal environment ?

I know that I can create temporary file by Filesystem.Path_GetTemporaryFileName but my libarary cannot write to already opened file.



Hi Kj,

You can outsystem inbuild features to save file in personal environment like first you need to get path of directory via get_directory function then tou need to add folder name then use save file action. All built function you will find in filesystem, system in manage dependencies.. Ignore the typo mistake because posting from mobile.


Thanks,

Rajat



That is exactly what I did. I was getting errors and I thought it is permission issue. But maybe it is issue with my library.



Hi,


You need to provide read/write permission to that folder via RDP. If you don't have RDP access then you need to create the folder first through built in function then you need to save file in that folder.


Thanks,

Rajat

2018-05-16 11-16-36
João Heleno
 
MVP

How long is the path string returned?

Maybe it's the maximum path length limitation from Windows kicking in...

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.