filepath Questions

3

Solved

I am creating a format string that is different based on class, that is used to generate a filename by a generic class method. I'm using the Python 3.4+ pathlib.Path module for object-oriented file...
Dyke asked 26/9, 2019 at 21:14

2

Solved

#include <iostream> #include <fstream> using namespace std; int main() { ofstream fo("output/folder1/data/today/log.txt"); fo << "Hello world\n"; fo.close...
Olivarez asked 29/3, 2022 at 8:2

4

Solved

I download the video file from url and save it in document directory with this path: let destination: DownloadRequest.DownloadFileDestination = { _, _ in let pathComponent = "pack\(self.packID)...
Masked asked 18/12, 2017 at 7:54

5

Solved

Is it possible to get a full path with double backslash by using Path.GetFullPath? Something like this: C:\\Users\\Mammamia\\Videos\\Documents\\CFD\\geo_msh\\cubeOp.txt instead of this: C:\User...
Schlessel asked 15/2, 2012 at 13:15

6

Solved

When creating filepaths and URLs, I noticed that many times the path starts with ./ or ~/. What is the difference between filepaths that start with ./ and ~/? What do each of them mean?
Mathieu asked 15/7, 2015 at 16:24

15

Solved

I am creating a Java application where I am using log4j. I have given the absolute path of configuration log4j file and also an absolute path of generated log file(where this log file are generated...
Nummular asked 27/10, 2010 at 12:5

28

Solved

Every now and then when I build my solution here (with 7 projects in it) I get the dreaded 'Command copy exited with code 4' error, in Visual Studio 2010 Premium ed. This is because of the post-bu...

5

Solved

I'm using io/ioutil to read a small text file: fileBytes, err := ioutil.ReadFile("/absolute/path/to/file.txt") And that works fine, but this isn't exactly portable. In my case, the files I want ...
Thorium asked 12/6, 2013 at 17:6

2

Solved

Let's say you're writing the IOS component of a Flutter plugin in Swift. You have your MyFlutterPlugin.swift file open in XCode. So that we know what we're talking about the same thing, it's the fi...
Reg asked 10/1, 2022 at 4:32

3

Solved

So I have a web project, and I'm trying to get the root directory of the website using the c# method Directory.GetCurrentDirectory(). I don't want to be using a static path as the file locations wi...
Peasant asked 8/6, 2012 at 15:18

3

Solved

I have found that there are lots of similar function in the package path and the package path/filepath. I have tried several common paths like /var/log/something but did not find any differences. W...
Tightfisted asked 27/8, 2016 at 13:41

2

I have made a Racket library for convenience in accessing the XDG Basedir directories. As I want the library to be useable on Windows as well (for cross-platform programs), I have it use standard W...
Cortezcortical asked 8/5, 2017 at 17:13

2

I have created a temporary directory in python where I am saving a bunch of .png files for later use. My code seemingly works fine up until the point where I need to access those .png files - when ...
Ott asked 4/8, 2018 at 13:36

9

Solved

I need to know which is the real path of a given path. For example: The real path is: d:\src\File.txt And the user give me: D:\src\file.txt I need as a result: d:\src\File.txt
Posey asked 21/1, 2011 at 19:49

3

I have written a C# program for saving and reading PDF files. The program saves the output files to the local computer's bin folder. I want my program to access files from a different computer. I ...
Stilton asked 11/12, 2012 at 19:2

8

I am currently making a small simple Java program for my Computer Science Final, which needs to get the path of the current running class. The class files are in the C:\2013\game\ folder. To get t...
Adrenocorticotropic asked 10/6, 2013 at 15:32

3

Solved

How could I design a RegEx script which would remove a filename from a path? The trick is, the paths have all sorts of wrenches to throw into the works. Paths can consist of: 1: "Folder1/Folder2/...
Antipole asked 11/9, 2014 at 20:20

2

I am trying to write a function which will validate weather the given path is valid in Linux/Windows with file extension. ex: Windows path: D:\DATA\My_Project\01_07_03_061418738709443.doc Linux ...
Reaganreagen asked 31/5, 2017 at 15:38

2

Solved

In Go, is it possible to get the root directory of a path so that foo/bar/file.txt returns foo? I know about path/filepath, but package main import ( "fmt" "path/filepath" ) func main() { ...
Oblige asked 9/11, 2015 at 21:53

9

Solved

Is there any function in c# to shink a file path ? Input: "c:\users\Windows\Downloaded Program Files\Folder\Inside\example\file.txt" Output: "c:\users\...\example\file.txt"
Shastashastra asked 2/12, 2011 at 17:41

4

I wrote a script to read text file in python. Here is the code. parser = argparse.ArgumentParser(description='script') parser.add_argument('-in', required=True, help='input file', type=argparse...
Alexandraalexandre asked 26/2, 2015 at 8:10

1

I am writing the R package and trying to use external files. I placed it in inst/extdata and use system.file("extdata", "file.csv", package = "mypackage") to load the ...
Mealie asked 21/8, 2020 at 21:47

9

How do I remove the file name from a URL or String? String os = System.getProperty("os.name").toLowerCase(); String nativeDir = Game.class.getProtectionDomain().getCodeSource().getLocation().getF...
Antilles asked 17/2, 2014 at 12:35

6

I have a path (including directory and file name). I need to test if the file-name is a valid, e.g. if the file-system will allow me to create a file with such a name. The file-name has some unicod...
Cismontane asked 2/3, 2012 at 11:26

2

Solved

I am using a .iss script to build an exe file inside Inno Setup Compiler. I need to package some node_modules into this application so I have a line under [Files] which looks like this: Source: "{...
Dituri asked 5/8, 2016 at 12:46

© 2022 - 2024 — McMap. All rights reserved.