file Questions
7
Solved
I have a class MyClass and an inner class MyNestedClass like this:
public class MyClass {
...
public class MyNestedClass {
...
}
}
Both classes are very long. Because of that i'd like to sep...
Cumber asked 2/6, 2011 at 18:29
28
Solved
How can I delete the contents of a local folder in Python?
The current project is for Windows, but I would like to see *nix also.
4
I have the below code to try search for all files in my downloads folder and then delete them all however it's returning an error message based on the kill function not having enough arguments, any...
7
Solved
I have written the following script to concatenate all the files in the directory into one single file.
Can this be optimized, in terms of
idiomatic python
time
Here is the snippet:
import...
14
Solved
I have a process that's writing a lot of data to stdout, which I'm redirecting to a log file. I'd like to limit the size of the file by occasionally copying the current file to a new name and trunc...
4
In C#, what's the simplest/safest/shortest way to make a file appear as though it has been modified (i.e. change its last modified date) without changing the contents of the file?
72
Solved
How do I include a JavaScript file inside another JavaScript file, similar to @import in CSS?
Quip asked 4/6, 2009 at 11:59
11
Solved
In my app the user is to select an audio file which the app then handles. The problem is that in order for the app to do what I want it to do with the audio files, I need the URI to be in file form...
6
Solved
I have this code:
line1 = []
line1.append("xyz ")
line1.append("abc")
line1.append("mno")
file = open("File.txt","w")
for i in range(3):
file.wr...
10
Solved
I have a local markdown file containing several links and I want that links head to local file like pdf.
I use the following syntax:
[my link](file:///C:/my_file.pdf)
But when I open my markdow...
6
I'd like to write a function that deletes all empty folders, with the option to ignore certain file types (allowed file types are stored in the hashmap) and tell if it should look inside directorie...
8
Solved
Just started using Kotlin and created some activities as Kotlin Files. They work, but still, I want to know what the difference between creating a File and a Class.
6
Solved
I've got a junk directory where I toss downloads, one-off projects, email drafts, and other various things that might be useful for a few days but don't need to be saved forever. To stop this direc...
3
Solved
As part of a larger task performed in R run under windows, I would like to copy selected files between directories. Is it possible to give within R a command like cp patha/filea*.csv pathb (notice ...
1
I write a program with typescript in node js (not an API or web app) just a console app. I have configured the typescript configuration. but when I make a File Object it give me error
UnhandledProm...
Nietzsche asked 4/9, 2021 at 5:10
41
How do I check whether a file exists or not, without using the try statement?
Influential asked 17/9, 2008 at 12:55
6
Solved
5
Solved
I'm developing a little app in Electron from which I can upload an image to Instagram and I'm stuck at one of the first steps :/
I want to select an image from the filesystem and display it in my ...
Bithia asked 10/6, 2018 at 8:6
7
Solved
6
Solved
Basically I'm wondering why this doesn't output anything:
tail --follow=name file.txt | grep something | grep something_else
You can assume that it should produce output I have run another line...
Convection asked 25/3, 2011 at 1:9
7
I would like to get a list of files with a specific extension in a directory. In the API (Java 6), I see a method File.listFiles(FileFilter) which would do this.
Since I need a specific extension,...
7
Solved
I am given a list of paths that I need to check files within. Of course, if I am given a root, and a subdirectory, there is no need to process the sub-directory. For example
c:\test // process this...
2
According to mmap() manpage:
MAP_PRIVATE
Create a private copy-on-write mapping. Updates to the mapping are not visible to other processes mapping the same file, and are not carried through t...
Bullyrag asked 7/6, 2019 at 17:42
10
I find myself doing this a lot just to ensure the filename is not in use. Is there a better way?
Directory.Exists(name) || File.Exists(name)
17
Solved
I'm trying to write a simple Python script that will copy a index.tpl to index.html in all of the subdirectories (with a few exceptions).
I'm getting bogged down by trying to get the list of subd...
© 2022 - 2024 — McMap. All rights reserved.