Questions tagged [filehandler]

File handlers are mechanisms which provide abstraction over primitive file operations.

File handlers are modules (e.g. classes) which wrap primitive file operations (e.g. read, write) and file system operations (e.g. unlink, move, file watching) in helpful abstractions for specific usage scenarios.

For example, a file handler implemented as a class in opens a file in the format, reads each entry, and populates a list of row objects. In this case, the file handler has wrapped the open and read calls so the the caller need only know the name of the file.

Questions relating to the development of custom file handlers should include this tag. Additionally, questions which involve the use of standard or third-party file handlers may also include this tag.

See also:

147 questions
0
votes
2 answers

Logging into a File from a Netbeans Web Service

I want to do some simple logging, what am I missing here? I just want to log it as simple as possible (for now). This code seems to work, but not on the web service! @WebMethod(operationName = "xyz") public boolean xyz(@WebParam(name = "entityID")…
Belial
  • 1
  • 1
-1
votes
2 answers

how to open the file with path name?

I am trying to open the file using a path instead of file name I used glob.glob option to go and search in the path for an input file. Now I got struck with opening that. Any help would be appreciated. import glob a = (glob.glob("*/file.txt")) with…
user7090
  • 83
  • 1
  • 6
-1
votes
1 answer

How to create or configure Filehandler in java to logic my logs in different executions?

You may think it a stupid question, but surely I found no specification for it. I have a mini-program that needs to log success and failures upon execution and I need the log to be kept apart from default ones so I can easily read it every time.…
iaguitos
  • 1
  • 1
-1
votes
3 answers

email with attachments using Python

I am trying to write a Python script that will: 1. Run at scheduled times during the day. 2. Will collect whatever files (in .mobi format) are in a particular directory (say C:\myFiles) and email them as attachments to a particular email…
-1
votes
1 answer

Read lines (two or more lines) from the output of AT command and put it to database

I want to read two lines from AT Command's output and do INSERT INTO table VALUES in python. The output of AT is always in two rows but it's a sequence, unlike open file and read it until the next limiter, but we have to wait. anyway this is my…
FREEMASTER
  • 13
  • 4
-1
votes
1 answer

Saving errors to a file handler

With the code below, I'm trying to simulate the command shell, I even created a command and called it (Showerrlog) to help the user seeing his invalid commands that he entered during his current work session, as you can see, I did that using…
-2
votes
1 answer

C++ reading command from .txt file

I want to create a little "calculator" but I dont know how can I create. My problem is, I have an input file (.txt) with codes: acc +40 acc -14 nop +386 jmp +262 acc -4 nop +25 ... the "acc" adds the number to my variable the "jmp" is jump to the…
-2
votes
2 answers

How to seach for a string in .gz file?

I am new to scripting and trying to read the .gz file and copy the lines if it contains "Alas!" in its file. myfiles/all*/input.gz. In the mentioned path it should search for all the directories that starts with (all). for an input.gz file. In…
-2
votes
2 answers

Filehandler create file in directory

How to create log file in an existing directory ?..I have tried out this code: String fileName = "/log/ABC.log"; FileHandler fileHandler = new FileHandler(fileName, true); But it is not working.Here log is the directory...
user746458
  • 369
  • 2
  • 13
  • 26
-3
votes
1 answer

When I am appending every string to .txt file by using try String(contentsOf: shareLog) in swift failing Some times

I am calling bellow function to get contentsof the .txt file and I am getting successfully some times but some times when I am trying to get It Is going to catch block and giving the bellow error ..please help me out // Used for sharing func…
tp2376
  • 690
  • 1
  • 7
  • 23
-3
votes
1 answer

Filehandler unsaved changes

I have made a simple filehandler in C# and I have a problem with unsaved changes. When I've changed the text in my textfield, I want it to show with a * in the Formwindow name. I can't use a textfield1_TextChanged because then there would be lots…
-4
votes
2 answers

How to update and delete a specific line from a text file in C# windows form

I am new in using file handler in c#. I have done insert and search. Please help me how can I do update and delete using this following code. UI part:: private void btnAdd1_Click(object sender, EventArgs e) { StudentManager sm = new…
1 2 3
9
10