How to import file from general path in cypress?

Not knowing the data type and assuming that the exact location of the file doesn't matter, I would recommend moving the file to the /fixtures folder and importing it as recommended in the Cypress docs here. So you can use a relative path for the import in your test like:

import contents from '../fixtures/contents';

You can also find an example for importing a JSON file in this answer.