file-io Questions

7

Solved

Aims I'm trying to let users download a file (myfile.zip in this case) by clicking a button on the page, without them leaving the page - ie the browser must stay on the current page, and leave the...
Kean asked 3/3, 2009 at 1:49

2

Solved

Is there any way to open a terminal device file in erlang ? I am on Solaris and I am trying the following:: Erlang (BEAM) emulator version 5.6 [source] [64-bit] [async-threads:0] [kernel-poll:fa...
Towe asked 23/12, 2010 at 9:26

2

Solved

Following this question which asks (and answers) how to read .mat files that were created in Matlab using Scipy, I want to know how to access the fields in the imported structs. I have a file in M...
Johannajohannah asked 31/12, 2009 at 9:48

7

Solved

Code: static void MultipleFilesToSingleFile(string dirPath, string filePattern, string destFile) { string[] fileAry = Directory.GetFiles(dirPath, filePattern); Console.WriteLine("Total File Cou...
Hamster asked 25/1, 2013 at 15:27

7

Solved

I have created a small python script of mine. I saved the pickle file on Linux and then used it on windows and then again used it back on Linux but now that file is not working on Linux but it is w...
Tibbetts asked 4/12, 2009 at 20:39

6

Solved

I am reading integers from a text file, giving them as input to a query and getting the query output and writing to an xls file. ResultSet rs; Connection con = null; PreparedStatement ps = null; i...
Toowoomba asked 25/5, 2012 at 11:25

3

Solved

On macOS (High Sierra) when I attempt to list the file at the path /private/var/db/ConfigurationProfiles/Store I get the error "Operation not permitted". Using sudo doesn't better it and even em...
Guilty asked 25/9, 2019 at 14:7

7

what is the best and fastest way to calculate directory sizes? For example we will have the following structure: /users /a /b /c /... We need the output to be per user directory: a = 1224KB...
Nath asked 29/11, 2010 at 20:18

5

Solved

I want to open a file from the folder res/raw/. I am absolutely sure that the file exists. To open the file I have tried File ddd = new File("res/raw/example.png"); The command ddd.exists(); ...
Charactery asked 9/4, 2013 at 21:24

2

Solved

I have a VBScript that goes over an HTML form, fills it with fixed values and then submit it. It works fine so far, but now i need to set the location of a file that is going to be uploaded within ...
Unguentum asked 3/5, 2013 at 18:47

6

Background: I want to read some data from a text file, into a polars dataframe. The data starts at the line containing the string foo, and stops at the first empty line afterwards. Example file tes...
Related asked 20/3, 2024 at 22:53

19

Solved

What is the best way to open a file as read/write if it exists, or if it does not, then create it and open it as read/write? From what I read, file = open('myfile.dat', 'rw') should do this, right?...
Sloppy asked 3/6, 2010 at 15:5

12

Solved

I am trying to open the file recentlyUpdated.yaml from my Python script. But when I try using: open('recentlyUpdated.yaml') I get an error that says: IOError: [Errno 2] No such file or directory: ...
Abruzzi asked 30/8, 2012 at 17:1

5

Solved

If I do this: File f = new File("c:\\text.txt"); if (f.exists()) { System.out.println("File exists"); } else { System.out.println("File not found!"); } Then the file gets created and always r...
Aqueduct asked 2/7, 2012 at 10:21

6

Solved

Lately I've been asked to write a function that reads the binary file into the std::vector<BYTE> where BYTE is an unsigned char. Quite quickly I came with something like this: #include <f...
Alfy asked 28/2, 2013 at 14:45

3

Solved

I'm using the following C# code to read a tiny text file over a network share: string fileContent; using (var stream = File.OpenRead(filePath)) using (var reader = new StreamReader(stream, FileEnc...
Implosive asked 2/4, 2015 at 1:32

20

Solved

Is there a default/official/recommended way to parse CSV files in C#? I don't want to roll my own parser. Also, I've seen instances of people using ODBC/OLE DB to read CSV via the Text driver, and...
Attitudinize asked 17/1, 2010 at 15:21

7

I'm facing org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException: Fail to save:an error occurs while saving the package : The part /docProps/app.xml fail to be saved in the stream with mars...
Leastways asked 6/11, 2013 at 10:56

12

Solved

In bash, calling foo would display any output from that command on the stdout. Calling foo > output would redirect any output from that command to the file specified (in this case 'output'). I...
Vermeil asked 7/1, 2009 at 1:45

22

Solved

I need to read and write data to/from a text file, but I haven't been able to figure out how. I found this sample code in the Swift's iBook, but I still don't know how to write or read data. import...
Consueloconsuetude asked 7/6, 2014 at 13:42

31

Solved

I am trying to read a large file one line at a time. I found a question on Quora that dealt with the subject but I'm missing some connections to make the whole thing fit together. var Lazy=requir...
Trudi asked 27/5, 2011 at 18:49

1

Can someone point me in the good direction to understand the (seeming) inconsistency in the way to define dtype during pandas.read_csv ? dtype = int # --> produces error if blank values dtype = i...
Pragmaticism asked 25/2, 2020 at 20:50

3

Solved

The documentation for the OS module does not seem to have information about how to open a file that is not in a subdirectory or the current directory that the script is running in without a f...
Spriggs asked 7/12, 2010 at 21:6

14

I faced this problem when I tried to save the image to internal storage on android. public static String setImage(Bitmap image) { if (image != null) { FileOutputStream outputStream = null; File ...
Kami asked 24/4, 2020 at 11:0

3

Solved

I don't know what's my mistake. FileInfo[] FileInformation = DirectoryInfo.GetFiles(textBoxPath.Text); for (int i = 0; i <= FileInformation.Length; i++) { File.Move(FileInformation[i].Director...
Jeana asked 12/7, 2013 at 16:54

© 2022 - 2025 — McMap. All rights reserved.