Beispiel #1
0
        internal async Task SetLockInfoAsync(LockInfo lockInfo)
        {
            lockTokenFileStream.Seek(0, SeekOrigin.Begin);
            await JsonSerializer.SerializeAsync(lockTokenFileStream, lockInfo);

            lockTokenFileStream.SetLength(lockTokenFileStream.Position);
        }
 /// <summary>
 /// Creates instance of this class.
 /// </summary>
 /// <param name="userFileSystemPath">Path of this file of folder in the user file system.</param>
 /// <param name="lockInfo">Information about the lock. Pass null if the item is not locked.</param>
 public UserFileSystemItem(string userFileSystemPath, LockInfo lockInfo = null)
 {
     this.UserFileSystemPath = userFileSystemPath;
     this.RemoteStoragePath  = Mapping.MapPath(userFileSystemPath);
     this.Lock = lockInfo;
 }
Beispiel #3
0
 /// <summary>
 /// Creates instance of this class.
 /// </summary>
 /// <param name="userfileSystemFolderPath">Path of this folder in the user file system.</param>
 /// <param name="lockInfo">Information about file lock. Pass null if the item is not locked.</param>
 public UserFolder(string userfileSystemFolderPath, LockInfo lockInfo = null) : base(userfileSystemFolderPath, lockInfo)
 {
 }
 /// <summary>
 /// Creates instance of this class.
 /// </summary>
 /// <param name="userFileSystemFilePath">Path of this file in the user file system.</param>
 /// <param name="lockInfo">Information about file lock. Pass null if the item is not locked.</param>
 public UserFile(string userFileSystemFilePath, LockInfo lockInfo = null) : base(userFileSystemFilePath, lockInfo)
 {
 }