file-access

app data path during development versus deployment

时光总嘲笑我的痴心妄想 提交于 2019-12-11 19:30:01
问题 I have an old Windows Forms .Net application that on Windows XP was "deployed" by copying all the files to the application folder. Now I plan to deploy to newer windows OS's using either InstallShield or Advanced Installer, and will be placing the dlls in app install folder, and the content files in ProgramData and/or user's AppData. So the content files will be in one location during debugging under Visual Studio 2010 (probably just keep them where they are now, in app's bin/debug folder),

PHP: How to output image files?

别等时光非礼了梦想. 提交于 2019-12-11 06:58:36
问题 I would like to add images to a dynamically generated page (I use my own template system) with PHP. NOTE: I regulate image access for security reason. The folder that contains the images is above the site root, therefore not accessible by HTML links. I believe there is a method in which PHP returns a file as a resource, specifying the type in a header, and (correct me if I am wrong) a function specifically designed for that imagejpeg() . Please advise, and if possible write a simple example.

suppressing or not allowing the access time to be modified java

心不动则不痛 提交于 2019-12-11 03:27:47
问题 I'm writing a Java Class which extends Ant Zip Task to do a particular job for me. I want to create a zip file and once that file is created, I want to suppress the access time in the inode so I can't be modified or find a way to not let it change, even if the file is modified. The reason for that is I made a md5 hash which depends on the access time. Thus that's giving me a lot of trouble, and making the access time constant will solve my problem. Does someone now how would I accomplish that

Asp.net - access some folder on file share based on user authenticated

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 00:03:26
问题 I have an asp.net web application with forms authentication and users (credentials) are checked against active directory, username is actually samAccountName attribute from AD. Now I need to enable users to get access to some files which are located on file share, where each user has his own folder. First proof of concept works like this: appPool in IIS is configured to run under some domain user, and this user was given R/W access to file share and all user folders when the user logs into

FileStream.close() does not free file for other processes

丶灬走出姿态 提交于 2019-12-10 13:29:14
问题 I have Following Code in a Page_Load called function. When the Page is loaded the first time after starting Visual Studio, everything works out fine. But any other opening call to the File after that returns IOException: "File is in use by another process" , even when directly opening the File in VisualStudio Solution this Error is returned(of course not as Exception) FileStream mailinglist_FileStream = new FileStream(@"\foobarFile.txt", FileMode.Open); PeekingStreamReader mailinglist_Reader

Problems reading and writing to a text file in C#

独自空忆成欢 提交于 2019-12-08 13:59:41
问题 Ok so I have looked at every other question that relates to my problem and can't see where I am going wrong. My objective is to write the results of a dice simulator to a text file then read that contents into a listbox in C#. Here is my code so far: namespace WpfApplication1 { public MainWindow() { InitializeComponent(); } private void button1_Click(object sender, RoutedEventArgs e) { try { Random RandomValue = new Random(); Random RandomValue2 = new Random(); using (StreamWriter outputFile

Applet frameworks for access to local file system

筅森魡賤 提交于 2019-12-08 04:39:18
问题 I need a Java applet framework or something like that for syncing files between server and local machine through browser. Of course I can make that applet myself, but maybe someone has already seen or done that applet. Are there any Java applet frameworks for accessing the local file system through a browser? 回答1: See the Applet info. page for references to 'Next Generation'. Since the Next Generation plug-in, even sand-boxed embedded applets can access the local file-system (with the

Applet frameworks for access to local file system

半城伤御伤魂 提交于 2019-12-07 15:26:26
I need a Java applet framework or something like that for syncing files between server and local machine through browser. Of course I can make that applet myself, but maybe someone has already seen or done that applet. Are there any Java applet frameworks for accessing the local file system through a browser? Andrew Thompson See the Applet info. page for references to 'Next Generation'. Since the Next Generation plug-in, even sand-boxed embedded applets can access the local file-system (with the permission of the user, when prompted). Next Gen. applets: Can be deployed using Java Web Start

File access, unit testing, dependency injection

↘锁芯ラ 提交于 2019-12-06 10:03:15
问题 I've recently asked a question regarding best ways of separating business logic from data access to make application testable (here). Thanks to Jeff Sternal, I've created interface for the data access and passing its concrete implementation from the application top level to BL. But now I'm trying to figure out how can I separate file access methods from business logic. Let's say I have a function that loads data from a database into dataset, formats loaded data (formats are stored in some

UWP apps accessing files from random location on system

烈酒焚心 提交于 2019-12-06 05:41:24
问题 in UWP there are files and permissions restrictions, so we can only acces files directly from few folders or we can use filepicker to access from anywhere on system. how can I use the files picked from filepicker and use them anytime again when the app runs ? tried to use them again by path but it gives permission error. I know about the "futureacceslist" but its limit is 1000 and also it will make the app slow if I am not wrong? . Is there a better way to do this ? or can we store storage