Questions tagged [filestream]

In .NET framework filestream exposes a Stream around a file, supporting both synchronous and asynchronous read and write operations. ActionScript 3 for AIR 2 and above also uses FileStream, which supports both synchronous and asynchronous read and write operations.

2765 questions
0
votes
1 answer

C# Calculate an MD5 of an Input and Output FileStream

I'm using this, slightly modified, to copy large files from a file share with the ability to continue copying, if the download was disrupted. It runs in a BackroudWorker and reports progress. This works fine, but I'd like to have the ability to…
Daro
  • 1,990
  • 2
  • 16
  • 22
0
votes
1 answer

Cpp create string creation without initialization

I want to read the contents of a file into a string. string contents(size, '\0'); -> size was determined above using the file.seekg and file.tellg. file.read((char*) contents.data(), size); Now, I know that the contents of the string will be…
ecstrema
  • 543
  • 1
  • 5
  • 20
0
votes
1 answer

Show PDF on webpage using Stream C#

I'm trying to embed PDF viewer to show PDF document on a webpage. When I run this code, it normally shows me PDF just like I want, but when I refresh, everything crashes (I get a message "Failed to load PDF Document"). The error that I actually get…
gh99
  • 11
  • 1
0
votes
1 answer

Upload filestream to cloud-files with Node.js

I know that it's possible to upload files to my cloud-files account in Node.js, using the following module: node-cloudfiles. But is it also possible to upload a filestream directly? In my case I am dowloading an image from a certain location in…
robinvdvleuten
  • 1,462
  • 1
  • 16
  • 18
0
votes
1 answer

Reading EDI files and writing into new file

I have a big text file (which has about 20k lines) using which I need to replace some lines of text in other text files (about 60-70 of them). The other files can be called as templates. The lines in these templates needs to replaced based on some…
San
  • 1,797
  • 7
  • 32
  • 56
0
votes
1 answer

Can gRPC server stream return a Stream to Blazor Wasm instead of IAsyncEnumerable?

I need to stream a file from ASP.NET Core to Blazor WASM using gRPC. I would like to use the new class DotNetStreamReference added in net6 to allow stream directly to disk using JSInterop (see…
Claudio
  • 133
  • 2
  • 11
0
votes
0 answers

TypeError: video is null

I try to make a simple video permission projects with audio and it successfully took permission but after provide the permission it's show an error as video is null. Bellow the code using JS,
0
votes
0 answers

how to find filename with the help of time creation?

I have a date and time when file was created in a system and I am trying to get the filename with the help of date and time. It is possible or not, if it is possible then anyone please tell me. How can I get a filename using data and time in…
kamlesh jha
  • 361
  • 2
  • 8
0
votes
0 answers

What is the wrong part of my C code using binary filestream?

Probelm_1 : Make a program that receives the employee's name, ID, age, and salary on the keyboard and stores them in the binary file expire.bin However, employee information should be expressed in structure, name is defined as a string, and the rest…
y J.
  • 131
  • 4
0
votes
0 answers

How can I provide an in-memory file to a method being tested that only accepts a file path?

I am trying to use Moq and Nunit to test a method of this form: crc public long computeCRC(string filepath) { long crc; ...open file at filepath compute crc... return crc; } I don't want the file at filepath to be on a drive (I might…
davecove
  • 1,001
  • 4
  • 16
  • 36
0
votes
0 answers

Why isn't the file saved during execution in C?

The source code of program_1 is as follows. /* program_1.c */ #include int main(void) { FILE *ofp; ofp = fopen("myfile", "w"); fprintf(ofp, "test"); getchar(); fclose(ofp); getchar(); return 0; } The terminal running one…
y J.
  • 131
  • 4
0
votes
1 answer

Downloading JSON files from API and saving it in files

I try to write app which takes a bunch of URLs and asynchronously saves theirs content in separated files. I wrote that code as synchronous and it worked quite okay so I tried to make it async. The problem is that I get some exceptions: The process…
Dzemojad
  • 13
  • 2
0
votes
5 answers

After transmission of text files blank lines appears in them

EDIT: Filezilla caused the problem, when i download files back from server it added new lines. I'm sorry for confusion. This method upload files to ftp server and it's work fine, but in text files uploaded to server blank lines appear after every…
Anatoly
  • 25
  • 1
  • 5
0
votes
1 answer

Write .csv data from stream to IList

i want to copy the data of an uploaded file to an IList object. The uploaded file is .csv-data. My code looks like this: public void FileToIList(IFormFile importFile) { if (importFile != null) { …
Christian01
  • 307
  • 1
  • 5
  • 19
0
votes
2 answers

Unzip files and save them to a Blob Storage stream

My workflow for this proof of concept is: Azure Function App detects a .zip file in blob storage (Stream inputBlob) Function app calls my code, which needs to extract the the files and save them individually to the Blob Storage Container Stream…
zakparks31191
  • 919
  • 2
  • 21
  • 42
1 2 3
99
100