A file handle is an abstract indicator for accessing a file. It is retrieved after successfully opening the file using the file name. Afterwards the file handle is used instead of the file name for all file operations.
Questions tagged [filehandle]
407 questions
3
votes
2 answers
JNI issue: symbol lookup error by FileHandle in C++ DLL
I made JNI functions and linked them with the c++ dynamic library successfully. I got all of them working just fine, but I had an issue for one function, I got symbol lookup error from the FileHandle class that I used in the c++ that I use to read…

MohamedMansour
- 63
- 6
3
votes
2 answers
How to pass and read a File handle to a Perl subroutine?
I want a Perl module that reads from the special file handle, , and passes this to a subroutine. You will understand what I mean when you see my code.
Here is how it was before:
#!/usr/bin/perl
use strict; use warnings;
use lib…

cooldood3490
- 2,418
- 7
- 51
- 66
2
votes
1 answer
Program file handle
I have a program which set the number of file handle open to unlimited at the entry point of the program. When the program runs under root, i don't have any problem with the file handle. It can open lot more than initial limit 1024. But of non-root…

Rituparna Kashyap
- 1,497
- 13
- 19
2
votes
1 answer
Testing re-installation - I need a method/program that holds onto files
I'm writing a wix installer and I need to test the reinstall process. The program that I'm installing has files which can be in use by a second program.
I want to test what will happen if the common files are in use when the re-installation is run.…

Neil
- 5,179
- 8
- 48
- 87
2
votes
2 answers
CreateFile Returns negative handle
Any ideas why the createfile() function would be returning -1.
Handle = CreateFile(filename, &H80000000, 0, 0, 3, &H80, 0)
This is run a few times. I was thinking perhaps maybe the file is not being closed properly?
EDIT
Err.LastllError returns 32.

gberg927
- 1,636
- 9
- 38
- 51
2
votes
0 answers
FileHandle prevents File.Move
I am trying to figure out why the following code prevents overwriting of the file used in the filestream.
This only happens when using Cut and Paste, Copy and Paste
works weirdly enough
var fs = new FileStream(
File.OpenHandle(
path,
…

Daniel
- 99
- 8
2
votes
2 answers
Is there a way to get the current file handle that would be used with the <> operator in perl?
I've seen that close ARGV can close the currently processed file, but it would seem that ARGV isn't actually a file handle, so I can't use it in a read call. Is there any way to get the current file handle, or am I going to have to explicitly open…

Adrian
- 10,246
- 4
- 44
- 110
2
votes
4 answers
File Handling question on C programming
I want to read line-by-line from a given input file,, process each line (i.e. its words) and then move on to other line...
So i am using fscanf(fptr,"%s",words) to read the word and it should stop once it encounters end of line...
but this is not…

AGeek
- 5,165
- 16
- 56
- 72
2
votes
1 answer
Perl: How to run more than 1 command inside open while opening a filehandle into commands
How to run more than 1 command inside open?
I have a code below. Here, I am running make $i inside open, but now I want to run more than 1 command here, say make $i; sleep 30; echo abc. How can I do that?
foreach $i (@testCases) {
my…

PPP
- 329
- 1
- 9
2
votes
4 answers
How to make a custom print format?
I want to print some variables to a file in a custom table format and have the ability to add to the table without adding the header again and keeping previous information.
Here's my code:
import time as r
data = r.strftime("%d %m %Y %I %M")
with…

Zen35X
- 76
- 2
- 10
2
votes
2 answers
How to open a filehandle with an existing variable in perl?
In my Perl script, I would like to process lines from either STDIN or a given file, if specified, as common with Linux/UNIX command line utilities.
To this end, I have the following section in my script (simplified for the post):
use strict;
use…

bp99
- 338
- 3
- 15
2
votes
1 answer
FileSystemHandle.requestPermission DOMException: User activation is required to request permissions
I need a open local file feature in my website, so I use File System Access API in my code.
when the file opened from local is edited by my web and need to save to original file. I found it has no permission. Therefore, I find the way to request…

user2956843
- 177
- 1
- 10
2
votes
1 answer
IO::Select and adding a tag to the handle
I'm wondering what's the best way to add additional data to a handle when I'm using IO::Select?
Basically I'd like to add a handle to IO::Select but also have additional info attached to that handle that I could retrieve later.
Note: I know I could…

G4143
- 2,624
- 4
- 18
- 26
2
votes
1 answer
How does subprocess handle file pointer?
Suppose the code skeleton in Python looks like this. This code is invoking another executable bash script to run in parallel, on Ubuntu 18.04.
#!/usr/bin/env python3
#encoding:utf-8
import subprocess
with open(file='subprocess_output.log',…

Della
- 1,264
- 2
- 15
- 32
2
votes
2 answers
perl how can I append STDOUT of list form system call of perl script to a file
My bosswrap.pl will generate arbitrary arrays containing whitespace in the elements. It repeatedly sends the array by a system call to wrapped.pl, which creates STDOUT based on the array.
Subsequently, bosswrap.pl must append the STDOUT of…

Jacob Wegelin
- 1,304
- 11
- 16