[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[DotGNU]Unix File IO

From: Brett L Trotter
Subject: [DotGNU]Unix File IO
Date: Fri, 12 Dec 2003 08:48:49 -0600
User-agent: KMail/1.5.4

I've been working on an OverTheNet backup application for a while, and the 
foundation of it rests in a proprietary archive format that delivers some 
special features and additional reliability over other formats. In any case, 
ive been trying to make it windows and unix capable and have succeeded thanks 
to dotGNU. But in the process i've encountered some problems.

1) File/Directory.SetCreationTime: from what I know, you have to do a direct 
filesystem write to change the ctime of an inode. Will this ever be 

2) File/Directory.Set/GetAttributes: On windows VS.NET, 
File.GetAccessTime/LastWriteTime/etc work on both files and directories. In 
dotGNU, this is not true, one must call the specific function for either dir 
or file. Is this due to MS ignoring ECMA spec or something else?

3) In my backup application i wanted to set/get unix file permissions. So i 
wrote a crude hack using System.Diagnostics to execute stat and parse the 
results and some methods for processing unix permissions into a struct and 
back to integer representation (700, 655, etc). All those things were simple. 
I think my methods for the unix permissions might be of use to someone, but I 
would want to use PInvoke or other methods to get the stat information more 
directly. I could use a little help with this. Likewise, i wrote code to use 
chmod, chgrp, and chown to set the permissions and ownership. Is there a way 
dotGNU can support these kinds of filesystem calls more directly?

4) Directory.CreateDirectory(). I seem to get Permission denied creating 
directories in places I know i can write. And writing a system diagnostics 
call to mkdir -p works brilliantly in place of the directory.createdirectory 
code. Am i doing something wrong?

5) FileInfo().Length. I cannot seem to get the file size in unix using this 
method. I ended up using my stats call for that as well.

Has anybody else dealt with these same issues?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]