Results 1 to 2 of 2

Thread: File / Directory access

  1. #1
    Join Date
    Jun 2005
    Posts
    1,081
    Thanks
    4
    Thanked 15 Times in 15 Posts

    Default File / Directory access

    I'm wondering how many off you have faced security lockdown issues when developing sites routines that read/write from the disk.

    I have noticed that many third-party controls make calls to unmanaged code, which typically means you can't use them in a shared hosting environment unless they are added to the GAC.

    What I'd like to know is what routines / libraries you guys use for File / Directory access in a shared hosting environment. I will be needing the following methods:

    Read Directories
    Read Filelist
    Create Directory
    Delete Directory
    Create / Write File
    Delete File

    This should be basic stuff, but it seems like many people have found different ways to do this when building controls.

  2. #2
    Join Date
    Sep 2005
    Posts
    190
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I've opted to use php where I've needed file operations. The only file operation I have needed here so far was one to list midi files in a directory. That was achieved simply in php:

    <?
    foreach (glob("*.mid") as $filename)
    {
    //do what you need with $filename
    }
    ?>

    I've used other built in php file and directory functions (fopen, fwrite, fclose, chdir, etc. ) elsewhere with success, although I never got unlink (to delete a file) to work there. Fortuantely I was in a situation where I could get away with overwriting the existing file.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. virtual directory
    By psykik in forum ASP.NET
    Replies: 4
    Last Post: 27th June 2006, 11:52 AM
  2. New Free Directory
    By fcmisc in forum For Sale, Sites and Services
    Replies: 0
    Last Post: 10th March 2006, 01:07 PM
  3. PHP: Calculating a Directory File Size
    By nick in forum Code Sharing
    Replies: 17
    Last Post: 29th January 2006, 09:32 AM
  4. CSV File Upload to Access
    By s80wkr in forum ASP (VBScript)
    Replies: 5
    Last Post: 25th January 2006, 10:56 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •