tagged [io]

Find all files in a directory with extension .txt in Python

Find all files in a directory with extension .txt in Python How can I find all the files in a directory having the extension `.txt` in python?

12 Apr at 15:56

How to read all files in a folder from Java?

How to read all files in a folder from Java? How to read all the files in a folder through Java? It doesn't matter which API.

1 Mar at 22:14

Deleting all files in a directory with Python

Deleting all files in a directory with Python I want to delete all files with the extension `.bak` in a directory. How can I do that in Python?

26 Apr at 13:8

Creating a file asynchronously

Creating a file asynchronously How can I modify this method to call it asynchronously?

"Invalid Host header" when running Angular/cli development server c9.io

"Invalid Host header" when running Angular/cli development server c9.io Current command: `ng serve --host --public $IP:$PORT` Results on my website: > Invalid Host header

29 Oct at 14:28

How to WriteAllLines in C# without CRLF

How to WriteAllLines in C# without CRLF I'm using C# and am trying to output a few lines to an ASCII file. The issue I'm having is that my Linux host is seeing these files as: I need this file to be j...

How do I check if file exists in jQuery or pure JavaScript?

How do I check if file exists in jQuery or pure JavaScript? How do I check if a file on my server exists in jQuery or pure JavaScript?

7 Nov at 15:3

What is the UnmanagedMemoryStream for?

What is the UnmanagedMemoryStream for? Can someone tell me what the `UnmanagedMemoryStream` class is used for? I am not able to figure out how and when this class could be useful?

11 Jan at 21:22

c# continuously read file

c# continuously read file I want to read file continuously like GNU tail with "-f" param. I need it to live-read log file. What is the right way to do it?

24 Sep at 21:21

What is the difference between Directory.EnumerateFiles vs Directory.GetFiles?

What is the difference between Directory.EnumerateFiles vs Directory.GetFiles? What is the difference between `Directory.EnumerateFiles` vs `GetFiles`? Obviously one returns an array and the other ret...

4 Feb at 11:46

File.Delete() versus FileInfo.Delete()

File.Delete() versus FileInfo.Delete() Is there much of a difference between using the static methods of the `File` object as opposed to creating a new `FileInfo` object and calling those methods?

14 Oct at 20:33

Why does System.IO.File.Exists(string path) return false?

Why does System.IO.File.Exists(string path) return false? returns always false, even when the file exists on the specified path. What could be the possible solution?

15 Jan at 15:46

How do you determine the size of a file in C?

How do you determine the size of a file in C? How can I figure out the size of a file, in bytes?

5 Apr at 00:8

can I check if a file exists at a URL?

can I check if a file exists at a URL? I know I can locally, on my filesystem, check if a file exists: Can I check at a particular remote URL?

30 Dec at 12:19

How do I create a file and write to it?

How do I create a file and write to it? What's the simplest way to [create and write to a (text) file in Java](https://docs.oracle.com/javase/tutorial/essential/io/file.html)?

27 Jan at 11:20

Are files in the temporary folder automatically deleted?

Are files in the temporary folder automatically deleted? If I create some file using `Path.GetTempPath()` - does it automatically get deleted at some stage, or is it up to me to delete it?

21 Jun at 17:6

Why doesn't java.io.File have a close method?

Why doesn't java.io.File have a close method? While `java.io.RandomAccessFile` does have a `close()` method `java.io.File` doesn't. Why is that? Is the file closed automatically on finalization or som...

9 Nov at 15:15

File.ReadLines without locking it?

File.ReadLines without locking it? I can open a FileStream with Without locking the file. I can do the same with `File.ReadLines(string path)`?

17 Mar at 11:43

After Directory.Delete the Directory.Exists returning true sometimes?

After Directory.Delete the Directory.Exists returning true sometimes? I have very weird behavior. I have, Sometimes Directory.Exists return true. Why? May be the explorer is open?

28 Aug at 12:3

Creating application shortcut in a directory

Creating application shortcut in a directory How do you create an application shortcut (.lnk file) in C# or using the .NET framework? The result would be a .lnk file to the specified application or UR...

16 Jan at 18:46

FileStream vs/differences StreamWriter?

FileStream vs/differences StreamWriter? Question: What is different between `FileStream` and `StreamWriter` in ? What context are you supposed to use it? What is their advantage and disadvantage? Is i...

2 Dec at 12:35

Java: print contents of text file to screen

Java: print contents of text file to screen I have a text file named `foo.txt`, and its contents are as below: > thisistext How would I print this exact file to the screen in Java 7?

20 Jun at 09:12

How to copy a file to another path?

How to copy a file to another path? I need to copy a file to another path, leaving the original where it is. I also want to be able to rename the file. Will FileInfo's CopyTo method work?

30 Dec at 12:20

How can I read a single character at a time from a file in Python?

How can I read a single character at a time from a file in Python? In Python, given the name of a file, how can I write a loop that reads one character each time through the loop?

12 Jan at 06:26

How to read a specific line using the specific line number from a file in Java?

How to read a specific line using the specific line number from a file in Java? In Java, is there any method to read a particular line from a file? For example, read line 32 or any other line number.

14 Oct at 07:6