Copying files to variables

I want to copy a txt file called message.txt that says “I like cars” to the variable fileContents but it only copies “I” to the variable heres the code


set theFile to "~/Library/Application Support/JARVIS/ServerData/message.txt"
			tell application "Finder"
				set unixPath to "/Library/Application Support/JARVIS/ServerData/message.txt"
				set foo to (open for access (POSIX file "/Library/Application Support/JARVIS/ServerData/message.txt"))
				
				
				set fileContents to (read foo)
				
				
				close access foo

Any help is appreciated

Have you tried … ?


set fileContents to read "/path/to/your/message.txt"

or


set fileContents to do shell script "cat /path/to/your/message.txt"

the first one does the same thing but the second one returns this error

So I changes the path from a POSIX to a :folder:folder whatever one and now its giving me this error

So I fixed it using the thing you said before I just had to put the file path in quotes thanks so much
Mike

set fileContents to do shell script "cat '/Library/Application Support/JARVIS/ServerData/message.txt'"