How to check if the file is out of synchronization
I would like to check every time my main application frame gets focus if the file has been changed while the frame was out of focus, like what eclipse has, how can I achieve this? (except by saving the file data on loosing focus, is there a better way to accomplish this)
Thanks in advance,
Adam Zehavi.
yes well thanks for pointing this out, my application is based on multiple frames that might or might not be working on the same Stream object or file, and since every modification should be noticeable for the other frame, I've made sure each frame saves and closes the file on 'save' and do not keep the stream open.
Thanks for the heads up,
Adam.
Similar Messages
-
How to check Whether the File is in Progress or used by some other resource
Hi All,
I am retrieving a file from the FTP server using Apache commons FTP.
I need to check whether the file is fully retrieved or in progress.
for now i can able to use the file which is partially retrieved. it is not throwing any file sharing exception or i am unable to find whether it is in progress.
How to check whether the file is in progress ? or The file is accessed by some other resource ?
Pls Help me.
Thanks,
J.KathirHi Vamsi,
Explicitly such kind of requirement has not been catered and i dont think you would face a problem because any application that is writing to a file will open the file in the read only mode to any other simultaneous applications so i think your concerns although valid are already taken care off .
In the remote case you still face a problem then as a work around. Tell the FTP administrator to set the property to maximum connections that can be made to ftp as one. I wonder if you have heard of the concept of FTP handle , basically the above workaround is based on that concept itself. This way only one application will be able to write.
The file adapter will wait for its turn and then write the files.
Regards
joel
Edited by: joel trinidade on Jun 26, 2009 11:06 AM -
How to check if the file already exists in the client directory
Hi all.
I'm on devsuite 10g. I'm using webutil to download files from DB using webutil function db_to_client.
What I need is to check if the file already exists in the client directory and if yes to display a message to ask the user if he wants to overwrite or no. How can I make this???
Here is the code that I'm using to download the file.
Thanks all for the collaboration.
Fabrizio
declare
file_path varchar2(2000) := null;
BEGIN
/** I ask where saving the file on the client machine **/
file_path:= webutil_file.file_selection_dialog
(directory_name => null,
file_name => :bin_docs.name,
file_filter => '',
title => 'Saving file',
dialog_type => save_file, --save_file
select_file => TRUE);
/** I download the file from DB to client **/
if webutil_file_transfer.DB_To_Client_With_Progress
( file_path ,
'BIN_DOCS',
'DOC' ,
'doc_id = '||:bin_docs.doc_id,
'Downloading file',
' '||:bin_docs.name) then
msg_alert('Download del file avvenuto con successo','I',false);
else
msg_alert('Si è verificato il seguente errore in fase di download '||SQLERRM,'I',false);
end if;
end;How about something like the below:
Note: I have a yes/no alert to asking if they want to over-write the existing file.
DECLARE
file_path VARCHAR2(2000) := null;
over_write BOOLEAN := TRUE;
BEGIN
/** I ask where saving the file on the client machine **/
file_path:= webutil_file.file_selection_dialog
(directory_name => null,
file_name => :bin_docs.name,
file_filter => '',
title => 'Saving file',
dialog_type => save_file, --save_file
select_file => TRUE);
IF webutil.file_exists(file_path) THEN
/** check a file by the same name exists in the selected directory **/
IF show_alert('Ask_overright') != alert_button1 THEN
/** If we say no then set over_write value to false **/
over_write := FALSE;
END IF;
END IF;
IF over_write THEN
/** I download the file from DB to client **/
IF webutil_file_transfer.DB_To_Client_With_Progress
( file_path ,
'BIN_DOCS',
'DOC' ,
'doc_id = '||:bin_docs.doc_id,
'Downloading file',
' '||:bin_docs.name) then
msg_alert('Download del file avvenuto con successo','I',false);
ELSE
msg_alert('Si è verificato il seguente errore in fase di'
||' download '||SQLERRM,'I',false);
END IF
END IF;
END;
cheers
Q -
How to check if the file already exists in the application server directory
Hi all. I'm on devsuite 10g.
I transfer file from local machine to application server using webutil function webutil_file_transfer.client_to_as and I want to check if the file I'm transfering already exists on the server directory.
How can I make this?
Thanks all,
Fabriziouse the text_io package and open the file in read-mode.
like this
declare
xFileType text_io.file_type;
begin
xFileType := text_io.fopen('c:\temp\test.txt','R'); --file on the middle tier
-- file exists;
text_io.fclose(xFileType);
exception
when others then
--file doesn't exist
end;
regards
Christian -
How to check-in the files checked out by another user
Hi All,
We are using NWDI for checking out and checking in the code.one of the developers checked out some files and left the company.so when I am trying to change the same files it says files are already checked out by another user and we dont have any idea of his password or his system where he has done the changes .
how do we check in his files and start working on the same files without any problem
Thanks
Bala DuvvuriThanks. Solved the problem.
Check out this Article:
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70ee5ab2-8d7a-2c10-d88b-dbe2fdf666e7?quicklink=index&overridelayout=true
Check NWDI/JDI System Copy Prerequisites
Step 3 tells you how to handle the activities.
Regards,
Vijay. -
How to do CHECK IN the files for the document?
Hi ,
By using BAPI_DOCUMENT_CHECKIN2 Function module I am uploading the Files for the Document number.
My problem is - After uploading the files to the document number the files are not in check in status.
I want the files to be checked in after uploading the from the FM.
Can anyone tell me what I am missing ? How to do check in the files.
I am passing the following values to FM.
ls_files-SOURCEDATACARRIER = ls_file-DATA_CARRIER.
ls_files-WSAPPLICATION = ls_file-application.
ls_files-DESCRIPTION = ls_file-file_desc.
ls_files-STORAGECATEGORY = ls_file-category.
ls_files-DOCFILE = ls_file-doc_path.
ls_files-CHECKEDIN = 'X'.
CALL FUNCTION 'BAPI_DOCUMENT_CHECKIN2'
EXPORTING
DOCUMENTTYPE = ls_file_data-dokar
DOCUMENTNUMBER = ls_file_data-doknr
DOCUMENTPART = ls_file_data-doktl
DOCUMENTVERSION = ls_file_data-dokvr
IMPORTING
RETURN = ls_return
TABLES
DOCUMENTFILES = lt_files
COMPONENTS =
DOCUMENTSTRUCTURE =
I appriciate you response on this.
Thanks in advance.Hi,
Check the values you are passing into ls_files .
you dont need to pass checkedin = 'X'.
and check the storagecategory field - this should not be blnak.
files-SOURCEDATACARRIER = lsfile-DATA_CARRIER.
ls_files-WSAPPLICATION = ls_file-application.
ls_files-DESCRIPTION = ls_file-file_desc.
ls_files-STORAGECATEGORY = ls_file-category.
ls_files-DOCFILE = ls_file-doc_path.
ls_files-CHECKEDIN = 'X'.
This FM will work. No issues just check the values you are psssing into this LS_FILES structure.
Rest of the fields are corect.
Thanks,
Murali. -
How to do Check in the files for the document number?
Hi ,
By using BAPI_DOCUMENT_CHECKIN2 Function module I am uploading the Files for the Document number.
My problem is - After uploading the files to the document number the files are not in check in status.
I want the files to be checked in after uploading the from the FM.
Can anyone tell me what I am missing ? How to do check in the files.
I am passing the following values to FM.
ls_files-SOURCEDATACARRIER = ls_file-DATA_CARRIER.
ls_files-WSAPPLICATION = ls_file-application.
ls_files-DESCRIPTION = ls_file-file_desc.
ls_files-STORAGECATEGORY = ls_file-category.
ls_files-DOCFILE = ls_file-doc_path.
ls_files-CHECKEDIN = 'X'.
CALL FUNCTION 'BAPI_DOCUMENT_CHECKIN2'
EXPORTING
DOCUMENTTYPE = ls_file_data-dokar
DOCUMENTNUMBER = ls_file_data-doknr
DOCUMENTPART = ls_file_data-doktl
DOCUMENTVERSION = ls_file_data-dokvr
IMPORTING
RETURN = ls_return
TABLES
DOCUMENTFILES = lt_files
COMPONENTS =
DOCUMENTSTRUCTURE =
I appriciate you response on this.
Thanks in advance.Any answers for this?
Thanks. -
How to check whether a file exist in the program folder or not?
Hi guys,
how to check whether a file exist in the program folder or not? Let is say i recieve a file name from user then i want to know if the file is there not and act on that base.
abdulLook at the class java.io.File and the .exists() method:
http://java.sun.com/j2se/1.4/docs/api/java/io/File.html -
I purchased an ablum thru itunes on my phone and it says i purchased the songs on itunes but when i go on my music it says i have to repurchase all the songs how can i get the songs with out havin to pay again
Whether you can redownload music depends upon what country that you in. If you are using your computer's iTunes then does music show in the Purchased link under Quicklinks on the right-hand side of the iTunes store home page (on your phone you might be able to redownload media via the Purchased tab in the iTunes store app) ? If music shows there, but not that album, then check to see if it's hidden : http://support.apple.com/kb/HT4919
If you aren't in a country when you can redownload music and it's still on your phone then you should be able to copy it over from the phone via File > Devices > Transfer Purchases. -
when bates numbering a .pdf in XI, how can I change the file name to include the bates number and the file name? I know under "file output: it's either/or. I need both. Thanks!
Long ago I wrote a little demo using the touch command. Check out the following thread:
http://forums.ni.com/ni/board/message?board.id=170&message.id=25128#M25128
LabVIEW Champion . Do more with less code and in less time . -
How to check & unzip zip file using java
Dear friends
How to check & unzip zip file using java, I have some files which are pkzip or some other zip I want to find out the type of ZIp & then I want to unzip these files, pls guide me
thanksHow to check & unzip zip file using java, I have
ve some files which are pkzip or some other zip I
want to find out the type of ZIp & then I want to
unzip these files, pls guide meWhat do you mean "other zip"? Either they're zip archives or not, there are no different types. -
How can I compress the file?
I've created a video that starts off with 20 layers and ends with 100, so the video starts moving at a decent speed in the beginning then slows down tremendously from the middle to the end. How can I make the video run at a steady speed? Also how can I make the file size smaller without ruining the quality and changing the image size?
Alright, there are several things to consider here.
1. Motion Tweens are expensive, when it comes to speed. Especially when you layer them on top of each other. So, if you have 100 layers of motion tweens, the player will tend towards slowing down.
If you are using Classic Tweens in CS4, or using a prior IDE, then check for broken, or unnecesasry tweens (tweens where there is no motion happening). Removing these will inevitably speed up the playback. Also, if there are layers that are continued but invisible, drop a blank keyframe at the end of their visible time. Less objects = faster playback.
If this isn't enough, and it many times isn't, consider exporting the whole thing out as a video or image sequence, and importing that into a new project for playback.
As for file size. You can change the JPG compression in the publish settings for the project. I've found that, unless using a lot of raster graphics, you can make this quite low without too much quality loss. Otherwise, my other suggestion can help with this too (exporting it out and reimporting for playback) -
How to check-in multiple files with same name having different revision num
Hi
Can anyone please tell me, how to check-in multiple files with the same name with different revision number using RIDC API.
For eg:
First I will check-in a file(TestFile.txt) into a content server with revision number 1 using RIDC API in ADF application. Then after some time, will modify the same file(TestFile.txt) and check-in again. I tried to check-in same file multiple times, however first time its checking-in correctly into server showing revision as 1, while checking-in same file again, its not giving any errror message, and also its not reflecting in server. Only one file(TestFile.txt) is reflecting in server.
How to implement this functinality using RIDC API? Any suggestions would be helpful.
Regards
Raj
Edited by: 887680 on Mar 6, 2013 10:48 AMHi Srinath
Thanks for your response. Its not cloning, its like check-in file first, then check-out the file and do some editing and then again upload the same file with different revision number using RIDC. I got the solution now.
Regards
Raj -
I have an older mackbook pro circa 2009, i thought it died on me it just went completely black. I later found out just a bad battery i purchased a new one in the interim. Now that i have discovered the problem i bought an older time capsule and backed up the older macbook i now want to transfer my personal files to my new macbook pro to maintain one personal mackbook. How can i move the files from my time capsule to my newer macbook pro?
thank you in advance for your help!!http://manuals.info.apple.com/en_US/iphone_user_guide.pdf
-
How can I take the files that were migrated from my PC to my Mac and add all those files to my current user instead of having 2 users? Having to log out just to sign in on a different user to access the files is absurd.
Do I make all the files sharable to all the NOW users on the mac then just delete the files? Or can i erase my account that I made when starting up my new mac and then just use the one with the transferred files?
I just dont want to have to og in and out of 2 different accounts .. Help please.
-NinaSorry. /Users is a folder path. It would be similar to C:\Users (if that exists on Windows).
So, in the Finder, select Computer from the Go menu.
You'll see Macintosh HD, double-click that to open it.
In there you'll see several folders. One is Users. That is where all the user Home folders exist. Select the other account's home folder and go to step 3.
If you have any more confusion, please stop and ask. We'll get there.
If you feel more comfortable, you can just log into that other account and move the files into /Users/Shared.
Then, log into the account you wish to use and copy the files from the Shared folder and paste them into your Home folder, wherever they belong, Documents, Music, Pictures, etc. That just takes a little more work. Transferring them into Shared, and then copying into your home sets the permissions on the files so that you won't have a problem accessing them later. The steps I provided just prevent you from having to do the double move, since you are not going to use the old account once you are done.
Quick unix shorthand. If someone gives you a file path that begins with a /, that means the root of the hard drive, ie Macintosh HD (if you haven't renamed it). The path separator in unix is /, not \.
A path that starts with ~/ means your Home folder, the one inside /Users named with your account name.
Maybe you are looking for
-
How do i use this apple id in my iphone
how do use this apple id in my iphone???
-
HP LaserJet 2430 Prints vertical grey bands
While printing, some characters from each line are repeated at 3 inch intervals along the length of the paper. This happens at about 2 inches and 7 inches from the left margin and appear as two vertical grey bands on the printout (portrait mode). The
-
Hello, sorry for my bad english. I don't understand something. Use a outputText for example, and bind its value to an Integer for example, already instanciated in the backing bean. Then, set a DateConverter to this outputText and display the page, yo
-
ARE YOU USING DIGITONE CALL BLOCKER ?
Have Verizon Freedom Essentials Verizon Call Assist works great on my Desktop Would appreciate comments from anyone who is presently using Digitone Call Blocker 10 What equipment do you use with it...Brand names? Tom Freedom Essentials, QIP 7100 1,Bo
-
No Sound in QuickTime when Slideshow Exported from iPhoto
I'm currently using iPhoto 2.0.1 and QuickTime Player 7.1.3. When I export a slideshow from iPhoto to QuickTime, a '.mov' file is created. When I play it, I can view the slideshow but there's no sound. Does anyone know why? Here's how I export a slid