I'm looking to write a regex for a file path that must start with some prefix. In this case it should start with '/tank/home/'. I also want to make sure that it contains no '/..' -- no jumping up to parent directories.
I spent a while fiddling around without coming up with anything quite right. I settled on using two regexes, the first ...
Dear ladies and sirs.
How can one with minimal effort (using some already existing facility, if possible) to convert paths like c:\aaa\bbb\..\ccc to c:\aaa\ccc ?
...
My file structure is this:
main.swf
/swf/child.swf
/video/testvideo.flv
When I compile the child.swf by itself, it loads and plays video just fine (using netStream.play(../video/testvideo.flv).
However, when I compile the main.swf, which at some point loads child.swf, I get this error when trying to play the video:
Error #2044: Unhand...
I want the location of the current execution project i.e in VB.NET/C# or the current class file's path?
Ok,let me elaborate i got 2 projects in one solution file,lets say A,B are projects, my startup project is B ,and im accessing a class file in A ,now i need to know virtual path of B. because i need it for accessing the resource file ...
Hello. I was wondering if there is a portable way to determine if 2 different paths actually reference the same file.
I have read this thread but is Windows-specific.
AFAIK, fstream isn't suitable for the job.
...
Consider a VS Test project looking like this:
The goal is to run some tests given some data in those Xml files.
How would you easily load a given Xml file into an XmlDoc within the unit test methods?
Current state is:
XmlDocument doc = new XmlDocument();
string xmlFile = "4.xml";
string dir = System.IO.Directory.GetCurrentDir...
Simple question here (though perhaps not such a simple answer):
Is it possible to specify a path for an (existing) named pipe that can be used by programs as if they were opening on a normal file?
According to this MSDN page, name pipes on the local computer can be referrenced using the following path syntax: \\.\pipe\PipeName, yet I'm...
Hi.
The problem is that I use the method file _ get _ contents("body.html") in a class that is in the same folder as body.html. The problem is that I get an error saying that the file could not be found. This is because I from another class require the file that uses the method file _ get _ contents("body.html"), and suddenly I have to...
Is there a framework or a library that I could use to split a file path into its components in iPhone SDK? I know I could code it myself, but I don't want to reinvent the wheel.
...
Hi All, and thanks in advacne for your help large or small.
A bit of a newbie to the powershell world and I'm trying to count the contents of a folder on a remote server.
I know that:
Get-ChildItem \\ServerName\c$\foldername -recurse | Measure-Object -property length -sum
works a treat.
However I'm trying to make the server name a...
I'm trying to work with some long file paths (Windows) in Python and have come across some problems. After reading the question here, it looks as though I need to append '\\?\' to the front of my long file paths in order to use them with os.stat(filepath). The problem I'm having is that I can't create a string in Python that ends in a ...
I have a custom MSBuild task, which processes a set of files and returns a modified subset of this. Basically, I just create a new ITaskItem array out of the input, skipping some items.
However, the RecursiveDir metadata disappears when this result set is returned to MSBuild! It is still with the correct values at the end of my custom t...
Hi guys,
I have a table that stores file paths of images.documents,pdf etc... My query is
Select File_Paths from Uploads
Now how do I check whether the file path is image or not using PHP... If it is an image i have to view it or else download it.......
...
I built a search provider for Windows 7. (using .osdx file and RSS web site)
the element in the returned RSS contains local file path.
example: <link>c:\windows\win.ini</link>
The problem is that the files shown in the search result window with the following message:
This item was blocked because of your Internet security settings...
Is there any special character that cannot be a part of the path in Windows or Unix that I can use it as a separator?
...
I tried using XAMPP on vista and gave up...I faced an issue with backslashes(widows uses forward slashes)..due to this none of my scripts could save any files to folders because the path would be like dir1\dir2\folder/image_folder/image.jpg...I tried WAMP it worked like a charm..it threw no errors and saved the image files as intented..I...
OK say I have a file called fileA.php in the same directory I have another file called fileB.php
so inside fileA there is this require_once('fileB.php') notice I did not specify a file path because both files are in the same directory.
Now if fileA is included into another file that is located somewhere else, it fails to include fileB ...
Hello
I'm writing a library that has filenames as inputs. One feature that I'm trying to include is to allow the user to pass in file URLs or file paths, because sometimes the input is generated from parsing XML, other time it's not. I'm using the boost filesystem to manipulate the path, and is wondering what is the best way to conver...
I need some code example on how I would use a filepath from a harddrive location to then play a .wav sound file when opened in swing GUI.
I don't need it to show a play button, or pause or stop.
I just want it to play when I select the 'Sound' option from my 'Files' in my window (I know how to do that already, no need to explain that).
...
I am trying to develop an application that uses a number of images that are stored in a seperate remote file location. The file-paths to the UI elements are stored within the Application Settings. Although I understand how to access and use the file-path from Settings in C# (Properties.Settings.Default.pathToGridImages + "OK.png"), I am...