Questions tagged [fstat]

38 questions
0
votes
2 answers

Reading .img file in C using open()

I am trying to map a .img file, and I am not sure why my code is not working. Here is my code, and when I run the code I keep getting my error, that p is equal to MAP_FAILED int diskinfo(int argc, char* argv[]){ void *p; char *size if (argc <…
Kay Carosfeild
  • 91
  • 1
  • 1
  • 12
0
votes
1 answer

Confused with the st_ino?

#include "stdio.h" #include int main(int argc, char *argv[]) { struct stat buf; //int fd = open("./fstatat.c", "r"); //int fd2 = fstatat(fd, "a.txt", &buf, 0); //printf("%d\n", buf.st_ino); stat("./fstatat.c",…
inmove shawn
  • 189
  • 1
  • 2
  • 9
0
votes
1 answer

How to extract the F statistic and the P value from results.f_test in statsmodels python

I run the OLS.fit() and use the fitted model to get the f value for a particular category like in ANCOVA. res = OLS.fit() R = [[0,1,0], [0,0,1]] res.f_test(R) The result is in the form of
user2848498
  • 57
  • 2
  • 7
0
votes
2 answers

Obtaining permissions for a file in C

I am looking for a way to check and make sure a file is readable, writeable, and exists, and if it is not I want to print a message stating so. I believe the information I am looking for can be found using fstat(), I just don't know the correct way…
Talen Kylon
  • 1,908
  • 7
  • 32
  • 60
0
votes
2 answers

How to check whether a zip file or compressed file is exist?

If i dont know whether a file is exist.If it exist i will do something depend on the content in that file.The file could be in .txt or .gz format and the file can also not exist. Below is my code: //Check whether is a zip file char…
Jaden Ng
  • 141
  • 1
  • 12
0
votes
1 answer

Monitoring file changes in Linux with older glibc

I need to monitor events on a regular file using file descriptors. I'm working on a machine with CentOS 4.1, and kernel version 2.6.18.128. After realizing that regular file cannot be monitored using epoll, I found this task can be accomplished…
SidR
  • 2,964
  • 1
  • 18
  • 32
-1
votes
0 answers

twostepweakiv - confidence set not computed

I am trying to use the twostepweakiv command in Stata to get weak-iv robust confidence intervals for an IV model with two endogenous regressors and two instrumental variables. I am struggling to interpret the output of the twostepweakiv…
Silvia
  • 9
  • 1
-2
votes
1 answer

c comparing file sizes using fstat issue

My code comparing 2 file sizes seems to behave as if keyfile > sourcefile. Is there something missing from the code below and what can I change? The two files I'm using for testing are 3kb keyfile and 14kb sourcefile, which should activate the last…
youjustreadthis
  • 622
  • 3
  • 9
  • 24
1 2
3