filesystem

Some APIs that support the NT namespace absolute path of the format "\Device\Xxx"

In this document, http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#paths To make these device objects accessible by Windows applications, the device drivers create a symbolic link (symlink) in the Win32 namespace, "Global??", to their respective device objects. For example, COM0 and COM1 under the "Global??" subdirectory ...

What is the C++ equivalent of PHP's is_dir() ?

What is the C++ equivalent of PHP's is_dir() ? http://www.php.net/manual/en/function.is-dir.php bool is_dir ( string $filename ) Tells whether the given filename is a directory. Working on a Linux platform only, what library would you use? And what if cross-platform support mattered, what method would you use? ...

Get effective executable filename

A .NET application (managed) runs on Windows 7 64 bit. It is actually running on a 64 bit environment. The application inspect running process (for example, calc.exe) which is located in c:\windows\syswow64\calc.exe. So, why the function Process.MainModule.Filename returns c:\windows\system32\calc.exe? Is it possible to get the effe...

C++: How to check if a file/directory is readable? (PHP equivalent: is_readable)

I am trying to validate a directory with C++. http://php.net/manual/en/function.is-readable.php bool is_readable ( string $filename ) Tells whether a file (or directroy) exists and is readable. What would be the equivalent of the above in C++? I am already using the boost/filesystem library to check that the directory exists. I ha...

Windows CE File Sytem

I need to discover which file system is installed in a LG phone with windows mobile 6.5. Does anyone knows how? thanks in advance. ...

What's the difference \\.\C: and \\.\C:\

In MSDN, String Meaning \\.\C: Opens the C: volume. \\.\C:\ Opens the file system of the C: volume. I could open \\.\C: volume device. But I couldn't open \\.\C:\ directory by CreateFile. How can I open the directory by CreateFile with \\.\ prefix. And if I open the directory, what can I do by using the handle. Are ...

PHP: Why is readdir working for me at command line but not browser?

I have 2 folders: /var/www/vhosts/mydomain.com/httpdocs/ and /var/www/vhosts/mydomain.com/httpdocs/duh/ Both folders have the EXACT same perms, group, owner, everything. If I set $path to the first one, no problems, I echo a list of files with 'html' in the filename. If I set $path to the second one, it dies on the opendir(). However,...

Generate "explorer tree" in Java efficiently (not using recursion)

Hi All, I have a question which could be language-agnostic but for this particular implementation I'm using Java. It is possible and relatively trivial to list the folders in a directory - using a function like this: private DefaultMutableTreeNode GenerateFSTree(File f) { int i = 0; File[] Children = f.listFiles(); Default...

android - show pictures in webView that are'nt in filesystem

Hello, how can I show pictures in WebView without saving images into file system? I have tried to implement my custom ContentProvider, but method openFile returns ParcelFileDescriptor that points into filesystem (or socket). My pictures are in filesystem, but in encrypted form. I have tried also URL.setURLStreamHandlerFactory, but in a...

Safety of allowing third parties to upload PHP to a site

I'm looking at building a site designed to allow users to test PHP code and was wondering if there's a safe way to implement such functionality. Of particular concern, is there a practical way to allow them to only edit the contents of a single folder without having a separate user on the server for every user of the site? Another thin...

How to create a Junction Point using WinApi?

There is CreateHardLink function to create Hardlinks.(Since Win2000) And There is CreateSymbolicLink function since Vista has been released. But why isn't there a CreateJunction? How does mklink make a junction? And How do I write codes to make junction in my app? ...

Working with block special files/devices to implement a filesystem

I've implemented a basic filesystem using FUSE, with all foreseeable POSIX functionality implemented [naturally I haven't even profiled yet ;)]. Currently I'm able to run the filesystem on a regularly file, but the next step in development is to host it on an actual block device. Running my code as is, immediately fails on reading st_siz...

Java NetBeans Beginner: Import Filesystem

Hi, I am new to Netbeans (using 6.9.1) and want to ask the following: Is there an import Project or import filesystem in NetBeans the same way as there is in Eclipse? I have a project in NetBeans and I want to make some temporary changes to see if they work. I thought that I could do it by creating a new project and then import filesyste...

Is there a method to determine if a file path is nested within a directory path in .Net

I want to determine if a folder contains a file, when both are specified by a path. At first glance this seems simple. Just check if the file path starts with the directory path. However, this naive check ignores several issues: Paths may be relative or absolute Paths may use the alternate directory separator Paths may use inconsisten...

Routing on local filesystem (for example on Server.MapPath)

I'm about to begin to use the asp.net module found at http://nathanaeljones.com/products/asp-net-image-resizer/ The module works like this: localhost/files/image.jpg.axd?width=400 (the module identifies this and resizes the image image.jpg). The problem is that I'm not just using images that is on my filesystem, I'm also using files th...

[AIR] Resolving relative paths outside the standard directories (applicationDirectory, desktopDirectory, etc)

I need to navigate to a file relative to my applicationDirectory, but as it says in the documentation: No ".." reference that reaches the file system root or the application-persistent storage root passes that node; it is ignored. But the crazy thing is that if I do something like File.applicationDirectory.resolvePath("/home/myHome/"...

WriteFile for a symbolic link which points a network volume's file.

I made a symbolic link file. mklink C:\LinkFileToPointNetworkFile.txt Z:\NetworkFile.txt Then I opened and read the file. Good. It works well. The target file's data has been read. -Of course, I didn't use FILE_FLAG_OPEN_REPARSE_POINT But if I try writing to the file, I get a 'access is denied'. This is not what I expected. Why ...

C++ FileIO Copy -VS- System("cp file1.x file2.x)

Would it be quicker/efficient to write a file copy routine or should I just execute a System call to cp? (The file system could differ [nfs, local, reiser, etc], however it would always be on a CentOS linux system) ...

manage uploaded files in database or file system?

I'm going to incorporate the feature for my users to upload small files which are under 2mb (jpg, gif, pdf and docs). For page loading times purposes and generally managing files in future, can you recommend is it best to have the files uploaded to the filesystem (and link to it via the database) or upload to the database directly as a B...

System.IO.Path equivalent in iOS

There are a lot of nice little functions in System.IO.Path like replacing a file extension, append to a path, getting a filename, getting a directory from a path in C#. Is there an iOS equivalent or somewhat close API? thanks! ...