swp directory, wp function