1

I created a index.php file under my phplessons directory:

enter image description here

before I used the phpStorm to open the directory, Apple's Text Editor opened it, now I have phpStorm open, but there is a ._index.php file alongside index.php file.

I don't know what's the ._index.php file is, but in it I find a string com.apple.TextEncoding.

What is this file and what is its purpose?

1 Answer 1

0

It's simply a temporary metadata file created by TextEdit app. You can safely ignore it.

File beginning with . are hidden files in macOS. Files beginning with ._ are metadata files created by apps in macOS.

If you do not wish to be bothered by such files, it's better to add it in your version control ignore rules (if you use one).

4
  • thanks your response, can I ask you the metadata files usage of it?
    – aircraft
    Aug 13, 2018 at 4:22
  • In this case, it indicates the encoding used for the contents of the text file.
    – Nimesh Neema
    Aug 13, 2018 at 4:22
  • Do you mean the metadata files indicates the settings of TextEdit editing the file? such as encoding, but if there is no metadata files for the TextEdit, what will happen? because I use the TextEdit open it there generate the metadata file automatically, so the use the default configurations for editing a text file. so why still need generate a metadata file?
    – aircraft
    Aug 13, 2018 at 4:30
  • To my understanding it is MacOS itself that create them to emulate HFS features not available on non-MacOS filesystems like FAT and NTFS. It is transparent to the app itself. May 1, 2020 at 13:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .