Frank
Frank

Reputation: 1

Filesetattr is not available with XE3 (Firemonkey)

I want create a hidden ini file under macosX environment with Firemonkey (XE3). But unfortunaly this command is not known anymore in system.utilys

Somebody tips?

Upvotes: 0

Views: 289

Answers (2)

Jeroen Wiert Pluimers
Jeroen Wiert Pluimers

Reputation: 24483

On a Mac, there are two ways to make file "hidden" or "invisible".

Like Linux or Unix, you can start the filename with a dot (.).

You can also use the setfile tool that ships with Xcode to set attributes to make it invisible ([setfile a -V filename][3]).

Depending on the way, you will have to replace the Win32 specific SetFileAttr call with a Mac specific rename, or find out which API setfile uses to set the attributes.

Upvotes: 2

Arioch 'The
Arioch 'The

Reputation: 16045

In UNIX (and in this layer Mac OS is largely spin-off from FreeBSD) there is no "hidden" flag on file, instead special files should have their name started with dot. http://en.wikipedia.org/wiki/Dot-file

So if you want to hide a file - rename it.

That is not the question about Delphi = that is the question of operating system, Windows vs UNIX.

Open console/terminal/whatever they call command prompt in Apple, go to ur home folder and issue two commands: ls and ls -a - compare the file lists in output.

Well, for starters you can do it in Linux - http://bellard.org/jslinux/ - wait few seconds for it to boot, then issue ls, ls -l, ls -a, ls -la and see the difference.

Dot-files are treated specially and hidden by default.

Upvotes: 1

Related Questions