Questions tagged [file-access]

Questions about programmatically accessing individual files. For questions about accessing a file system, use [filesystem-access]. Use either of these in conjunction with the applicable tag such as [contention], [security] or [capacity] to indicate the focus of the question.

Questions about programmatically accessing individual files. For questions about accessing a file system, use . Use either of these in conjunction with the applicable tag such as , or to indicate the focus of the question.

510 questions
6
votes
1 answer

How to ignore AccessDeniedExceptions when using Files.walkFileTree?

I want to track a complete hard drive partition (eg. D:) but I am getting the following exception: AccessDeniedException java.nio.file.AccessDeniedException: D:System Volume Information at…
swaheed
  • 3,671
  • 10
  • 42
  • 103
6
votes
0 answers

Why do the System.IOUtils functions and TStreamReader use fmShareCompat?

When I first saw the System.IOUtils unit with functions like TFile.ReadAllBytes and TFile.ReadAllText and the TStreamReader and TBinaryReader classes in System.Classes I was quite excited to have easy ways to read binary and text files. After using…
Jens Mühlenhoff
  • 14,565
  • 6
  • 56
  • 113
6
votes
1 answer

File access count in Linux

Is there a way how to effectively determine the number of accesses to a specific file and the process which accessed it without storing the access info by a 3rd party software? I'm looking for something built in inside the linux-based operating…
Dropout
  • 13,653
  • 10
  • 56
  • 109
5
votes
3 answers

Is there any reason to open a file with shared-write access?

I've always opened my files two ways -- either read access and shared-read, or read/write access and no sharing. To me it seems that allowing shared-write could always result in unexpected things happening to the file while you're reading it. Are…
zildjohn01
  • 11,339
  • 6
  • 52
  • 58
5
votes
4 answers

Denying direct access to a folder (only allow through app)

I need to prevent someone from directly accessing a pdf, instead only allowing them to be pulled through the app itself. How can this be done?
Keith Myers
  • 1,379
  • 2
  • 15
  • 29
5
votes
2 answers

C# Application can't read/write to files created by administrator when run in limited user account XP

I have an application that is useable by all users (admin or limited) in .NET (C# specifically). When the application first launches - it creates a few files that it needs in the C:\Documents and Settings\All Users\Documents\ for all subsequent…
jonathanq
  • 157
  • 1
  • 4
  • 10
5
votes
2 answers

Java - Access file with user authentication

I have a server where I work with a database and files using a java app. When I start my app I give a report regarding file access to the server using: public static boolean folderExists(String folderPath) { File folderToCheck = new…
Stefanos Kargas
  • 10,547
  • 22
  • 76
  • 101
5
votes
2 answers

Access Denied error while opening file in JavaScript

When I try to open window.open('file///C:\calendar.html') it throws Access Denied error How do I fix this? Thanks
5
votes
4 answers

Howto synchronize file access in a shared folder using Java (OR: ReadWriteLock on network level)

I have multiple applications running in one virtual machine. I have multiple virtual machines running on one server. And I have multiple servers. They all share a file using a shared folder on linux. The file is read and written by all applications.…
Eduard Wirch
  • 9,785
  • 9
  • 61
  • 73
5
votes
2 answers

Most efficient way to store/retrieve a dictionary in C#?

I have a dictionary which I need to store and retrieve as efficiently as possible from the disk. The key length (string) will typically vary from 1 to 60 characters (unicode) but could exceed that length (this is however marginal and…
Sylverdrag
  • 8,898
  • 5
  • 37
  • 54
5
votes
2 answers

Cannot delete temporary file after File.Copy in C#

After copying a file to a temporary directory, I am unable to delete the copy because of an UnauthorizedAccessException exception. The idea here is to get a copy of the file, zip it and then delete the copy, but after removing all the code between…
jveazey
  • 5,398
  • 1
  • 29
  • 44
4
votes
1 answer

Hadoop map-reduce operation is failing on writing output

I am finally able to start a map-reduce job on Hadoop (running on a single debian machine). However, the map reduce job always fails with the following error: hadoopmachine@debian:~$ ./hadoop-1.0.1/bin/hadoop jar hadooptest/main.jar…
openbas2
  • 263
  • 1
  • 7
  • 16
4
votes
2 answers

What is the difference between file and random access file?

what is the difference between file and random access file?
Mahendra
4
votes
2 answers

Correct way of checking a directory is available for writing

I recently added the use of GetTempPath to the application. During code review it was highlighted that the description of GetTempPath contains the information: The application should verify the existence of the path and adequate access rights to…
graham.reeds
  • 16,230
  • 17
  • 74
  • 137
4
votes
2 answers

how can i access a file/folder over network through XP_CMDSHELL in sql server 2008?

I am trying to access a folder/directory using 'EXEC MASTER..XP_CMDSHELL' it works for the local file/folder, how ever it can not access the folder over network. EXEC MASTER..XP_CMDSHELL 'c:\Images' --Works fine EXEC MASTER..XP_CMDSHELL…
Yaqub Ahmad
  • 27,569
  • 23
  • 102
  • 149
1 2
3
33 34