EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Java VDisk example creation of Briefcase folder does not work.

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#20288
Posted: 06/01/2012 06:33:32
by szagriichuk  (Basic support level)
Joined: 03/28/2012
Posts: 51

Hi, today I found that creation of Briefcase folder is not working in my application, tested on java VDisk example the same problem, on .NET example works good.

Could you check this problem for java API?
Thanks.
#20302
Posted: 06/01/2012 15:45:27
by Aether Works (Standard support level)
Joined: 06/01/2012
Posts: 11

It might be that the attribute for the briefcase is not set correctly -- I think when I used the VDisk example it did not correctly set the attribute for directories to 16 (and a briefcase is just a folder), so directories did not appear correctly.
#20312
Posted: 06/04/2012 05:15:41
by  shevchenko
Hi,

Can not reproduce this issue. What callbackFS version, OS, JNI, Java do you use? Please describe details how to reproduce this.

Best regards,
Taras.
#20332
Posted: 06/05/2012 03:48:57
by  shevchenko
Quote
Angus Macdonald wrote:
It might be that the attribute for the briefcase is not set correctly -- I think when I used the VDisk example it did not correctly set the attribute for directories to 16 (and a briefcase is just a folder), so directories did not appear correctly.


Are you sure? What part of code did that? Because all works perfect in sample with folders (explorer etc).
#20379
Posted: 06/07/2012 06:53:34
by szagriichuk  (Basic support level)
Joined: 03/28/2012
Posts: 51

Quote
shevchenko wrote:
Hi,

Can not reproduce this issue. What callbackFS version, OS, JNI, Java do you use? Please describe details how to reproduce this.


cbfs v.3.2.109, Windows 7 SP 1 x32, Java 7u4, How to reproduse:
Just run your example VDisk and try to create briefcase , and thats all!
#20380
Posted: 06/07/2012 07:08:15
by Eugene Mayevski (EldoS Corp.)

There must be some misunderstanding here. Briefcase creation works for us. You have mentioned that "VDisk example it did not correctly set the attribute for directories to 16" and the question is what makes you think that VDisk doesn't do something in this aspect. It's OS job to set attributes (including faDirectory).


Sincerely yours
Eugene Mayevski
#20381
Posted: 06/07/2012 08:13:52
by Aether Works (Standard support level)
Joined: 06/01/2012
Posts: 11

It's not my problem, but...

I tried creating a briefcase on VDisk and it doesn't work.

My comment referred to a previous VDisk example, where folder creation didn't work at all. I'm aware that the OS sets attributes, but there was a previous vdisk example which didn't do anything with this attribute, thus you couldn't create folders correctly -- this has been fixed now, but I hypothesized that it could be a similar issue at work here, since my own Java code correctly creates a briefcase and the vdisk example doesn't.

This leads be to believe that it isn't a problem with the JAR or CBFS, but with the example.


#20382
Posted: 06/07/2012 08:22:19
by Aether Works (Standard support level)
Joined: 06/01/2012
Posts: 11

szagriichuk:

On looking at my own code I had a workaround to make this work.

In onSetFileAttributes I don't set the attributes of the file if it is a directory and the incoming attributes are '0'. I don't know why that call is made, but it stops directories from appearing as directories, and stops the briefcase from being created properly.

The relevant part of my code (fileRef is similar to VirtualFile):

Code
      if (fileRef.isFile() || attributes != 0) {

               info.setAttributes(attributes);
            }
//else, do not set anything
#20383
Posted: 06/07/2012 09:50:20
by Volodymyr Zinin (EldoS Corp.)

Quote
Angus Macdonald wrote:
In onSetFileAttributes I don't set the attributes of the file if it is a directory and the incoming attributes are '0'.

The documentation for the OnSetFileAttributes callback says:
"FileAttributes - the attributes of the file. Attributes can be 0 if attributes must be left intact (not changed). FILE_ATTRIBUTE_NORMAL is used to reset attributes."

I.e. in the case the FileAttributes parameter is 0 then the OnSetFileAttributes callback is called to change some another attribute. For example - LastAccessTime.
#20384
Posted: 06/07/2012 10:01:36
by Aether Works (Standard support level)
Joined: 06/01/2012
Posts: 11

Thanks.

FYI, i've been using the documentation on the webpage, and this isn't there -- http://www.eldos.com/documentation/cbfs/ref_evt_setfileattributes.html.
Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.

Reply

Statistics

Topic viewed 3078 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!