Top "File" questions

A block of arbitrary information, or resource for storing information, accessible by the string-based name or path.

Get the current script file name

If I have PHP script, how can I get the filename from inside that script? Also, given the name of …

php file
Python open() gives FileNotFoundError/IOError: Errno 2 No such file or directory

For some reason my code is having trouble opening a simple file: This is the code: file1 = open('recentlyUpdated.yaml') …

python file file-io filenotfoundexception file-not-found
Batch files: How to read a file?

How you can read a file (text or binary) from a batch file? There is a way to read it …

file batch-file
Get data from file input in JQuery

I actually have a file input and I would like to retrieve the Base64 data of the file. I tried: $(…

jquery file file-upload base64 html-input
How to create a temporary directory/folder in Java?

Is there a standard and reliable way of creating a temporary directory inside a Java application? There's an entry in …

java file file-io directory temporary-directory
Change default text in input type="file"?

I want to change default text on button that is "Choose File" when we use input="file". How can I …

html file input default-value
How to find out whether a file is at its `eof`?

fp = open("a.txt") #do many things with fp c = fp.read() if c is None: print 'fp is at …

python file eof
Java FileOutputStream Create File if not exists

Is there a way to use FileOutputStream in a way that if a file (String filename) does not exist, then …

java file file-io new-operator fileoutputstream
How to edit/save a file through Ubuntu Terminal

This is quite a simple question: I just need to open a file (this filename is galfit.feedme). I can …

file ubuntu terminal save edit
Open file dialog box in JavaScript

I need a solution to display open file dialog in HTML while clicking a div. The open file dialog box …

javascript file dialog