Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2008-09

Can't read file written as result of TFileStream

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Alex Simachov

Hello All,

I'm writing file using TFileStream (0.9.25 lazarus/fpc 2.2.2/mac os x 10.5.4).

Code:
TFileStream.Create(Filename,fmCreate,WRITE_FILEMODE);

But then I can't read it because I don't have any
permissions (ever to read) for this file.

(File is created under /Users/MyName/ directory. )

Any suggestions?

Thanks in advance for answer!

P.S. I'm novice at this list and I've found any FAQ/rules - only note that this list is intended for technical questions/problems. So if I should ask at other list - please let me know.

Sincerely yours,
Alex Simachov

Reply by email

Lukas Gradl
to Alex Simachov

How's WRITE_FILEMODE defined - looks like this is the problem, don't know how it has to be set for ReadWrite...

Try to omit it completely,
TFileStream.Create(Filename, fmCreate);

Using Linux this gives you a file with permissions set to 644 - which should work for macos to, afaik...

regards
Lukas

Show quoted text 28 lines
Hello All, I'm writing file using TFileStream (0.9.25 lazarus/fpc 2.2.2/mac os x 10.5.4). Code: TFileStream.Create(Filename,fmCreate,WRITE_FILEMODE); But then I can't read it because I don't have any permissions (ever to read) for this file. (File is created under /Users/MyName/ directory. ) Any suggestions? Thanks in advance for answer! P.S. I'm novice at this list and I've found any FAQ/rules - only note that this list is intended for technical questions/problems. So if I should ask at other list - please let me know. Sincerely yours, Alex Simachov _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel
-------------------------- software security networks Lukas Gradl <fpc#ssn.at> Eduard-Bodem-Gasse 9 A - 6020 Innsbruck Tel: +43-512-214040-0 Fax: +43-512-214040-21 --------------------------

Reply by email