Thread: Remover all names from .txt list?

Results 1 to 2 of 2
  1. #1 Remover all names from .txt list? 
    Registered Member
    Join Date
    Sep 2007
    Posts
    46
    Thanks given
    1
    Thanks received
    0
    Rep Power
    1
    making a vote list that resets every 24 hours

    Code:
    public static void removeAllFromVoteList(String name) {
    		bannedNames.remove(name.toLowerCase());
    		deleteFromFile("./Data/votes/Votelist.txt", name);
    	}
    I want to change the: (name.toLowerCase())
    into something that removes all names from the list... anyone know what to put there, yes I know i'm not a genius...
    Thanks!
    Reply With Quote  
     

  2. #2  
    Registered Member
    gomomo11's Avatar
    Join Date
    May 2010
    Posts
    2,379
    Thanks given
    268
    Thanks received
    196
    Rep Power
    177
    Just print an empty string into the file:
    Code:
    PrintWriter writer = new PrintWriter(file);
    writer.print("");
    writer.close();
    Attached image
    no external links without affiliate
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 0
    Last Post: 12-21-2009, 08:44 AM
  2. Badwords list (badenc.txt)
    By Belkar in forum Snippets
    Replies: 20
    Last Post: 09-18-2009, 07:55 PM
  3. Domain list (tldlist.txt)
    By Belkar in forum Snippets
    Replies: 2
    Last Post: 09-02-2009, 02:33 PM
  4. Official PSP Names List
    By Rukin1 in forum Console
    Replies: 0
    Last Post: 02-25-2009, 12:30 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •