tags:

views:

33

answers:

2

I am interested in copying the plist from my application to somewhere in the folder. I am trying but that file's type getting changed Unix Executable file to Document Is there a way to programmatically copy the file without changing file type ?

Can any body help me ?

Thanks in Advance

A: 

No I am not changing the name of file, i am copying file as it is to another location. I have java application which i am running on MAC os, and i am using following

            FileFilter filter = new FileFilter() {

                public boolean accept(File pathname) {
                   if (pathname.getAbsolutePath().indexOf(File.separator + "data") != -1) {
                        return false;
                    } else if (pathname.getAbsolutePath().indexOf(File.separator + "Logs") != -1) {
                        return false;
                    }
                        return true;
                    } 
            };

FileUtils.copyDirectory("source path", "destination path",filter );

While is tried manually copy-paste on mac for same file (plist) that is same as source file with Unix Executable file extension

Tej Kiran
A: 

Your OS may be using the execute bit to determine if the file is an executable vs. a document. Try changing the execute bit of the file...

chmod a+x {filename}
Chris Nava