I need to create a file on mac which stays on server but shows on the synced folder on my mac. The file needs to show real size (lets say 10 MB) but should occupy negligible disk space. I know virtual files are the way to go but am not able to find any library or API which gives this facility. Please suggest if you have come across anything similar. I am using OSX Yosemite - 10.10
If I am able to modify the size property, that can also serve the purpose. I used xattr to try to modify size property but it wasn't modified as it is read-only. xattr can be used to add custom properties though. So, it seems like virtual file is only way out.
As mentioned in comment, have a look at OSX Fuse.