Exactly what do you want to have in this file? Do you want to create it within the Edison's file system or do you want to have it in the Edison's drive (the one that you see in Windows Explorer as X:).
If you want to create this file in the Edison's file system, then it's pretty simple, you will have to add a system call on your code that includes the command: echo Your_Message >> /home/root/your_file.txt. This way you will be able to add text lines to a file or create it if it doesn't exist.
How to do a system call will vary on which language you are using, since you mentioned the XDK, then I'm guessing that you are using Node.JS, in that case I suggest you to check this thread: Send and receive data to and from intel galileo, in there, the user Taimoor makes an example of how to use Child Process, that’s used in Node to add system calls to your code.
I see, the approach shouldn't be that different, however you will have to mount the Edison's drive from Linux first, I suggest you to check this thread: Access Edison mass-storage from within Edison.