зеркало из https://github.com/mono/mail-archives.git
107 строки
4.1 KiB
HTML
107 строки
4.1 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [mono-android] Can't set CreationTime on File
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:monodroid%40lists.ximian.com?Subject=Re%3A%20%5Bmono-android%5D%20Can%27t%20set%20CreationTime%20on%20File&In-Reply-To=%3C51EE6B5D.1090909%40all-the-johnsons.co.uk%3E">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<style type="text/css">
|
|
pre {
|
|
white-space: pre-wrap; /* css-2.1, curent FF, Opera, Safari */
|
|
}
|
|
</style>
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="013854.html">
|
|
<LINK REL="Next" HREF="013875.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[mono-android] Can't set CreationTime on File</H1>
|
|
<B>Paul Johnson</B>
|
|
<A HREF="mailto:monodroid%40lists.ximian.com?Subject=Re%3A%20%5Bmono-android%5D%20Can%27t%20set%20CreationTime%20on%20File&In-Reply-To=%3C51EE6B5D.1090909%40all-the-johnsons.co.uk%3E"
|
|
TITLE="[mono-android] Can't set CreationTime on File">paul at all-the-johnsons.co.uk
|
|
</A><BR>
|
|
<I>Tue Jul 23 11:39:09 UTC 2013</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="013854.html">[mono-android] Can't set CreationTime on File
|
|
</A></li>
|
|
<LI>Next message: <A HREF="013875.html">[mono-android] Can't set CreationTime on File
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#13855">[ date ]</a>
|
|
<a href="thread.html#13855">[ thread ]</a>
|
|
<a href="subject.html#13855">[ subject ]</a>
|
|
<a href="author.html#13855">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>Hi,
|
|
|
|
><i> I think, the following code worked in the past but now I get an error when
|
|
</I>><i> setting the timestamps (Invalide Parameter).
|
|
</I>><i>
|
|
</I>><i> FileInfo fi = new FileInfo(file);
|
|
</I>><i> fi.Attributes = FileAttributes.Normal; <-works
|
|
</I>><i> fi.CreationTime = timeCreate; <-fail
|
|
</I>><i> fi.LastWriteTime = timeLastWrite; <-fail
|
|
</I>><i> fi.LastAccessTime = timeLastWrite; <-fail
|
|
</I>><i> fi = null;
|
|
</I>><i>
|
|
</I>><i> My mono-version hasn't changed (still 4.2.7) for month, now.
|
|
</I>><i> Has google something changed in Android that prevents changing filetimes?
|
|
</I>
|
|
Can you create a small test case showing the problem? If you've not
|
|
changed anything, the code should still work.
|
|
|
|
4.2.7 of Xamarin.Android is really old (the alpha version is on 4.8.0
|
|
with the stable being 4.6.8) and all of them IIRC use the mono-3 branch now.
|
|
|
|
You might want to try
|
|
|
|
fi.CreationTime = timeCreate.TimeOfDay;
|
|
|
|
as well
|
|
|
|
Paul
|
|
--
|
|
"Voila! In view humble vaudevillian veteran, cast vicariously as both
|
|
victim and villain by the vicissitudes of fate. This visage, no mere
|
|
veneer of vanity, is a vestige of the “vox populi” now vacant, vanished.
|
|
However, this valorous visitation of a bygone vexation stands vivified,
|
|
and has vowed to vanquish these venal and virulent vermin, van guarding
|
|
vice and vouchsafing the violently vicious and voracious violation of
|
|
volition.
|
|
The only verdict is vengeance; a vendetta, held as a votive not in vain,
|
|
for the value and veracity of such shall one day vindicate the vigilant
|
|
and the virtuous.
|
|
Verily this vichyssoise of verbiage veers most verbose, so let me simply
|
|
add that it’s my very good honour to meet you and you may call me V.."
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="013854.html">[mono-android] Can't set CreationTime on File
|
|
</A></li>
|
|
<LI>Next message: <A HREF="013875.html">[mono-android] Can't set CreationTime on File
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#13855">[ date ]</a>
|
|
<a href="thread.html#13855">[ thread ]</a>
|
|
<a href="subject.html#13855">[ subject ]</a>
|
|
<a href="author.html#13855">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
|
|
<hr>
|
|
<a href="http://lists.ximian.com/mailman/listinfo/monodroid">More information about the Monodroid
|
|
mailing list</a><br>
|
|
</body></html>
|