Commit Graph
90 Commits
Author SHA1 Message Date
Marek Safar 13d9a0f334 Fix compiler warnings 2013-02-28 09:19:47 +01:00
Rodrigo Kumpera 1b92a4148c Since MOBILE implies NET_4_* now, take this into account and simplify our ifdefs. 2013-02-11 18:42:18 -05:00
Rodrigo Kumpera dba5f60e67 Remove moonlight sources in corlib that were only used by moonlight. 2013-02-11 16:03:37 -05:00
Rodrigo Kumpera b96d05dac3 Kill the MOONLIGHT define in corlib. 2013-02-11 16:03:28 -05:00
Marek Safar 7883a2dafd Clean up some static initializers 2012-10-03 12:19:55 +01:00
Sebastien Pouliot 2bd0b5aa2d Fix IsolatedStorageFile directory creation/deletion with rooted paths. Fix bug #5011 2012-05-22 14:37:13 -04:00
Sebastien Pouliot 1a843974f3 Fix bug #4101 when using a deep hierarchy of directories in isolated storage. 2012-03-27 08:39:34 -04:00
Sebastien Pouliot e842246fd1 Allow IsolatedStorage to work on MOBILE profiles even when CAS types are linked out 2011-07-20 13:29:46 -04:00
Rolf Bjarne Kvinge f64261401d Fix many corcompare issues for moonlight 2011-03-31 16:05:03 +02:00
Geoff Norton dafa930953 Add some missing types to the mobile profile 2011-03-20 21:53:16 -04:00
Miguel de Icaza d2a367e0a2 [GetFolderPath] Handful of .NET 4 changes
* Actually use the SpecialFolderPathOptions where we need them
  -> Create is acknowledged
  -> DoNotVerify is ignored, as Mono historically did not throw an
     exception on missing directories.
* Rename InternalGetFolderPath to UnixGetFolderPath as this is what it is.
* Fix existing references to the code
* Fix indentation in routine that was never properly formatted (ReadXdgUserDir)
2011-01-03 08:37:31 -05:00
Sebastien Pouliot c3e7a90fa5 [moon] Return true for IsolatedStorageFile.IsEnabled
* MoonIsolatedStorageFile.cs: Return true, instead of throwing a NIE,
for IsEnabled since this is the behavior for Silverlight 3 (i.e. always
enabled) even if the call is new in SL4 (but part of ML3 ;-)
2010-12-15 11:36:29 -05:00
Marek Safar bd05c6c836 Some .net 4.0 api compatibility fixes 2010-12-15 11:12:07 +00:00
Jonathan Pryor 9e2c5d2c14 Fix IsolatedStorageFile.GetUserStoreForApplication() for MOBILE.
IsolatedStorageFile.GetUserStoreForApplication() would previously throw an
IsolatedStorageException because no ApplicationIdentity was provided by the
AppDomain.

We would like to provide this method in a workable fashion to facilitate code
portability with Windows Phone 7, which exposes only this method for saving
files to stable storage.

Thus, skip the ApplicationIdentity and code identity checks for MOBILE
(MonoDroid, MonoTouch) so that IsolatedStorage Just Works.
2010-10-11 22:30:50 -04:00
Rolf Bjarne Kvinge 41f0288a89 2010-06-18 Rolf Bjarne Kvinge <[email protected]>
* MoonIsolatedStorageFile.cs: Add IsEnabled.

svn path=/trunk/mcs/; revision=159113
2010-06-17 23:47:17 +00:00
Carlos Alberto Cortez f8cd3fd6db 2010-06-16 Carlos Alberto Cortez <[email protected]>
* IsolatedStorageFile.cs: Remove should catch all the exceptions
	caused by DirectoryInfo.Delete and throw an IsolatedStorageException
	instead.


svn path=/trunk/mcs/; revision=159017
2010-06-16 12:20:38 +00:00
Carlos Alberto Cortez 3648983129 2010-06-08 Carlos Alberto Cortez <[email protected]>
* IsolatedStorageFile.cs: Ugh, accidentally forgot to commit the changes for
	in the previous commit.


svn path=/trunk/mcs/; revision=158673
2010-06-08 17:04:16 +00:00
Carlos Alberto Cortez fa59c4519d * IsolatedStorageFile.cs: GetUserStoreForSite is only throwing a
NotSupportedException.
	* IsolatedStorageFileStream.cs: Implement Flush by calling the base impl.

2010-06-07  Carlos Alberto Cortez <[email protected]>


svn path=/trunk/mcs/; revision=158612
2010-06-07 23:59:34 +00:00
Carlos Alberto Cortez 1535508307 * IsolatedStorageFile.cs: Remove and DeleteFile must report any
error found in our System.IO classes as IsolatedStorageException.

2010-06-07  Carlos Alberto Cortez <[email protected]>


svn path=/trunk/mcs/; revision=158593
2010-06-07 17:45:40 +00:00
Carlos Alberto Cortez 6b07b11036 2010-06-07 Carlos Alberto Cortez <[email protected]>
* IsolatedStorageFile.cs: Update the exceptions we are firing in 4.0
	for CreateDirectory, GetFileNames and GetDirectoryNames.


svn path=/trunk/mcs/; revision=158589
2010-06-07 15:01:00 +00:00
Carlos Alberto Cortez eac37095c0 2010-06-06 Carlos Alberto Cortez <[email protected]>
* IsolatedStorageSecurityState.cs: Make our .ctor internal - so we
	don't expose a public .ctor at all.


svn path=/trunk/mcs/; revision=158568
2010-06-06 18:29:18 +00:00
Carlos Alberto Cortez 6d55768aa7 2010-06-06 Carlos Alberto Cortez <[email protected]>
* IsolatedStorageFile.cs: Our 4.0 methods receiving a path should
	either return false or throw an IsolatedStorageException if the path
	refers to a directory outside the storage root.


svn path=/trunk/mcs/; revision=158566
2010-06-06 18:21:35 +00:00
Carlos Alberto Cortez cb9c0127a4 2010-06-04 Carlos Alberto Cortez <[email protected]>
* IsolatedStorageFile.cs: In CheckOpen check that the directory for
	the current storage is still valid, and throw an exception if needed.
	Also, in the static Remove method call Directory.Delete only if the
	directory exists, to avoid throwing an exception there.


svn path=/trunk/mcs/; revision=158478
2010-06-04 15:26:27 +00:00
Sebastien Pouliot 4091aeb5dc 2010-06-03 Sebastien Pouliot <[email protected]>
* MoonIsolatedStorage.cs: Make class internal so we can access it
	from System.Window.dll to adjust quotas


svn path=/trunk/mcs/; revision=158407
2010-06-03 15:28:59 +00:00
Carlos Alberto Cortez 347e1a2ac6 2010-06-02 Carlos Alberto Cortez <[email protected]>
* IsolatedStorageFile.cs: Check for empty paths and existing paths in
	both MoveFile and MoveDirectory, just as we do in CopyFile. Finally
	cover our IO calls with a try-catch block, so all the IOException
	instances are reported as IsolatedStorageException.


svn path=/trunk/mcs/; revision=158355
2010-06-02 18:30:40 +00:00
Carlos Alberto Cortez 9238181d94 2010-05-31 Carlos Alberto Cortez <[email protected]>
* IsolatedStorage.cs:
	* IsolatedStorageFile.cs: Implement AvailableFreeSpace, Quota,
	UsedSize and IncreaseQuotaTo.


svn path=/trunk/mcs/; revision=158223
2010-05-31 15:54:26 +00:00
Carlos Alberto Cortez 85b9760030 2010-05-27 Carlos Alberto Cortez <[email protected]>
* IsolatedStorageFile.cs: Implement CopyFile.


svn path=/trunk/mcs/; revision=158049
2010-05-27 17:19:48 +00:00
Carlos Alberto Cortez b94ffc9678 2010-05-27 Carlos Alberto Cortez <[email protected]>
* IsolatedStorageFile.cs: Implement GetCreationTime, GetLastAccessTime
	and GetLastWriteTime, as well as creating a single method to check for
	the closed/disposed fields.


svn path=/trunk/mcs/; revision=158030
2010-05-27 13:00:30 +00:00
Carlos Alberto Cortez f996d5555f 2010-05-26 Carlos Alberto Cortez <[email protected]>
* IsolatedStorageFile.cs: Remove should call Close, just as .Net seems
	to do.


svn path=/trunk/mcs/; revision=157970
2010-05-26 15:58:05 +00:00
Carlos Alberto Cortez d17afb0b6c * IsolatedStorageFileStream.cs: When creating the instance, we should check
for diposed first, and for closed on second place.
	* IsolatedStorageFile.cs: Add Obsolete to CurrentSize and MaximumSize,
	as part of 4.0.

2010-05-24  Carlos Alberto Cortez <[email protected]>


svn path=/trunk/mcs/; revision=157816
2010-05-25 01:02:15 +00:00
Carlos Alberto Cortez 07eadfa052 2010-05-24 Carlos Alberto Cortez <[email protected]>
* IsolatedStorageFileStream.cs: When creating our instance check that
	the IsolatedStorageFile is not closed/disposed.
	* IsolatedStorageFile.cs: Expose closed/disposed info as internal
	properties, as well as implement 4.0 MoveDirectory/MoveFile, CreateFile
	and OpenFile methods.


svn path=/trunk/mcs/; revision=157801
2010-05-24 16:13:39 +00:00
Carlos Alberto Cortez 0c1f40d84e 2010-05-23 Carlos Alberto Cortez <[email protected]>
* IsolatedStorageFile.cs: Implement FileExists and DirectoryExists, as
	well as adding fields to detect that Close/Dispose have been called
	and fire the proper exceptions.


svn path=/trunk/mcs/; revision=157784
2010-05-23 16:12:04 +00:00
Carlos Alberto Cortez eef4d3b49b 2010-05-21 Carlos Alberto Cortez <[email protected]>
4.0 Updates.

	* IsolatedStorage.cs: Add ObsoleteAttribute to CurrentSize and
	MaximumSize.
	* IsolatedStorageSecurityState.cs: New, stubbed.
	* IsolatedStorageSecurityOptions.cs: New file.


svn path=/trunk/mcs/; revision=157739
2010-05-21 20:22:03 +00:00
Carlos Alberto Cortez c393a5b143 2010-05-20 Carlos Alberto Cortez <[email protected]>
* IsolatedStorageFile.cs: Add the new 4.0 overloads for
	GetDirectoryNames and GetFileNames.


svn path=/trunk/mcs/; revision=157621
2010-05-20 13:09:36 +00:00
Jb Evain d229615ecc use MOONLIGHT symbol
svn path=/trunk/mcs/; revision=153657
2010-03-16 12:10:42 +00:00
Sebastien Pouliot c20fa2a85c 2009-11-01 Sebastien Pouliot <[email protected]>
* MoonIsolatedStorageFile.cs: Add new CheckSearchPattern 
	validation method. Fix GetDirectoryNames to behave like 
	GetFileNames wrt searchPattern


svn path=/trunk/mcs/; revision=145167
2009-11-01 16:46:27 +00:00
Miguel de Icaza 0204abe803 Drop more obsolete defines
svn path=/trunk/mcs/; revision=144304
2009-10-17 01:35:27 +00:00
Jb Evain bd9b888867 2009-08-30 Jb Evain <[email protected]>
* IsolatedStorageFileEnumerator.cs
	* MoonIsolatedStorageFileStream.cs
	* MoonIsolatedStorageFile.cs
	* MoonIsolatedStorage.cs
	* IsolatedStorageScope.cs
	* IsolatedStorageFileStream.cs
	* IsolatedStorage.cs
	* IsolatedStorageFile.cs:
		Use the traditional net_2_0 version of isolated storage
		for MonoTouch.


svn path=/trunk/mcs/; revision=140937
2009-08-30 16:24:36 +00:00
Jackson Harper 7ac381196d * MoonIsolatedStorageFile.cs: Allow paths in search patterns.
svn path=/trunk/mcs/; revision=134860
2009-05-27 18:12:27 +00:00
Sebastien Pouliot 52531b6daa In .:
2009-04-16  Sebastien Pouliot  <[email protected]>

	* corlib.dll.sources: Add System.IO.IsolatedStorage/
	MoonIsolatedStorage.cs to the build

In System.IO.IsolatedStorage:
2009-04-16  Sebastien Pouliot  <[email protected]> 

	* MoonIsolatedStorage.cs: New. Manage the shared (location, quota)
	information about Moonlight isolated storage.
	* MoonIsolatedStorageFile.cs: Adjust with new MoonIsolatedStorage.
	Implement IncreaseQuotaTo UI.
	* MoonIsolatedStorageFileStream.cs: Adjust with MoonIsolatedStorage.


svn path=/trunk/mcs/; revision=131903
2009-04-16 15:25:45 +00:00
Sebastien Pouliot 50fb5fadf9 2009-04-16 Sebastien Pouliot <[email protected]>
* IsolatedStorageFile.cs: Fix thread-safety issue at creation time.
	[Fix bug #431039]
	* IsolatedStorageFileStream.cs: Fix missing path check in Verify.
	[Fix bug #487659]


svn path=/trunk/mcs/; revision=131886
2009-04-16 12:03:19 +00:00
Sebastien Pouliot 0931e7ed5e 2008-12-23 Sebastien Pouliot <[email protected]>
* IsolatedStorageFile.cs: Use Url as the default evidence type when
	null is supplied.
	[Fix bug #430932]


svn path=/trunk/mcs/; revision=122041
2008-12-23 16:17:51 +00:00
Sebastien Pouliot 6268d0bdd3 2008-09-11 Sebastien Pouliot <[email protected]>
* MoonIsolatedStorageFile.cs: Add application and iste specific 
	initialization. Add rumenditary quota support (not thread or cross 
	process safe). Add a bunch of TODO & FIXME.
	* MoonIsolatedStorageFileStream.cs: Add quota checks (delegated 
	into MoonIsolatedStorageFile).


svn path=/trunk/mcs/; revision=112762
2008-09-11 14:39:16 +00:00
Sebastien Pouliot bafa554120 2008-09-05 Sebastien Pouliot <[email protected]>
* MoonIsolatedStorageFile.cs: Add calls to PreCheck inside EndRead
	and EndWrite methods.
	* MoonIsolatedStorageFileStream.cs: Throw an IsolatedStorageException
	when DeleteFile is called on an unexisting file.


svn path=/trunk/mcs/; revision=112374
2008-09-05 13:35:30 +00:00
Marek Safar cc9c53a109 Warnings cleanup
svn path=/trunk/mcs/; revision=111713
2008-08-27 15:40:13 +00:00
Sebastien Pouliot 3df1954ed8 2008-08-22 Sebastien Pouliot <[email protected]>
* MoonIsolatedStorageFile.cs: Implement Remove. Add a bunch of FIXME 
	mostly related to quota.
	* MoonIsolatedStorageFileStream.cs: Add a call to the container's
	PreCheck method in most methods. Add FIXME for quota.


svn path=/trunk/mcs/; revision=111394
2008-08-22 18:29:10 +00:00
Sebastien Pouliot a48fb190d6 2008-08-21 Sebastien Pouliot <[email protected]>
* MoonIsolatedStorageFile.cs: Split Application and Site storage.
	Start looking at quota.
	* MoonIsolatedStorageFileStream.cs: Added more validation to 
	ctors. Removed IsAsync (not in beta2). (SetLength) Start using some 
	quota checks 


svn path=/trunk/mcs/; revision=111308
2008-08-21 21:40:20 +00:00
Sebastien Pouliot dc565053ae 2008-08-20 Sebastien Pouliot <[email protected]>
* MoonIsolatedStorageFile.cs: More fixes to match unit tests.


svn path=/trunk/mcs/; revision=111177
2008-08-20 20:18:43 +00:00
Sebastien Pouliot 9a7fb919ce 2008-08-20 Sebastien Pouliot <[email protected]>
* MoonIsolatedStorageFile.cs: Fix API to match SL2 beta2. Start
	implementing new feature (while writing unit tests).
	* MoonIsolatedStorageFileStream.cs: Add new async methods [Begin|
	End][Read|Write] present in b2. Fix endless recursion in WriteByte.


svn path=/trunk/mcs/; revision=111152
2008-08-20 15:40:21 +00:00
Sebastien Pouliot 6db2b06432 2008-04-18 Sebastien Pouliot <[email protected]>
* IsolatedStorageFile.cs: Fix CreateDirectory to accept multiple 
	subdirectories. Avoid leaking full path in DeleteDirectory. Fix 
	GetDirectoryNames to work with path (and the search pattern).
	[Fix bug #376188]


svn path=/trunk/mcs/; revision=101172
2008-04-18 21:54:27 +00:00