public static boolean deleteFile(final File f) {
        try {
            return AccessController.doPrivileged(new java.security.PrivilegedAction<Boolean>() {
                @Override
                public Boolean run() {
                    try {
                        Files.delete(f.toPath());
                        return true;
                    } catch (NoSuchFileException nsfe) {
                        Tr.debug(tc, "no such file");
                        Tr.error(tc, "UNABLE_TO_DELETE_RESOURCE", new Object[] { f, nsfe });
                        return false;

                    } catch (DirectoryNotEmptyException dnee) {
                        Tr.debug(tc, "dir not empty");
                        Tr.error(tc, "UNABLE_TO_DELETE_RESOURCE", new Object[] { f, dnee });
                        return false;
                    } catch (IOException ioe) {
                        Tr.debug(tc, "dir not empty");
                        Tr.error(tc, "UNABLE_TO_DELETE_RESOURCE", new Object[] { f, ioe });
                        return false;
                    }
                }
            });
        } finally {

        }
    }
public static boolean deleteFile ( final File f ) { try { return AccessController . doPrivileged ( new java . security . PrivilegedAction < Boolean > ( ) { @ Override public Boolean run ( ) { try { Files . delete ( f . toPath ( ) ) ; return true ; } catch ( NoSuchFileException nsfe ) { Tr . debug ( tc , "no such file" ) ; Tr . error ( tc , "UNABLE_TO_DELETE_RESOURCE" , new Object [ ] { f , nsfe } ) ; return false ; } catch ( DirectoryNotEmptyException dnee ) { Tr . debug ( tc , "dir not empty" ) ; Tr . error ( tc , "UNABLE_TO_DELETE_RESOURCE" , new Object [ ] { f , dnee } ) ; return false ; } catch ( IOException ioe ) { Tr . debug ( tc , "dir not empty" ) ; Tr . error ( tc , "UNABLE_TO_DELETE_RESOURCE" , new Object [ ] { f , ioe } ) ; return false ; } } } ) ; } finally { } }
@param file