How to implement File lastmodified to compare IF FILE IS Modified ?
rgds,
Hi
I dont understand your question properly, but I guess U wanna see if a file(on your local system) has been modified or not, while specifying a given time. What I mean is if you have a function say "ismodified(Date d)" means that "Is the file modified after d?". Is that what you mean?
Then you have to write your own class that extends File say MyFile that has this particular function.
class MyFile extends File
public boolean isModified(Date d)
Date now = new Date();
long present = now.getTime();
long lastmodified = this.lastModified();
if(present==lastmodified)
return false;
else
return true;
I am not sure if this is what you are looking for.
Cheers
-Uday
Similar Messages
-
In the jspdynpage how to implements file download!!!!
in the jspdynpage how to implements file download!!!!
in the portal's view i need to implements download file like *.xls,i don't know how to do. and if servlet can be used in the portal application!
Edited by: xuhuanjun on Apr 8, 2009 9:57 AMHi,
Check the below thread that will help you.
How to get a file download window using URL component in HTMLB/JSPDynpage
Raghu -
How to implement File to jdbc scenario
Hi Guys,
I am implementing a scenario where in data is passed from File to the database. I have completed the file adapter configuration part. now how do I implement the jdbc adpter part?
Which database can I use for testing on the local machine?
Can i download and use any database?
If i want to use Access as a database what all settings do i need to do in access and Xi?
Regards,
AshishHi,
This might help you
/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
/people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
/people/saravanakumar.kuppusamy2/blog/2005/01/19/rdbms-system-integration-using-xi-30-jdbc-senderreceiver-adapter
/people/michal.krawczyk2/blog/2005/03/29/configuring-the-sender-rfc-adapter--step-by-step
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3867a582-0401-0010-6cbf-9644e49f1a10
Regards
Agasthuri Doss -
How to implement File Upload/DownLoad in OA page
Hi All
I have to implement the File download feature of OA Framework in my Custom OA page when i click the button.
In developer's Guide i gone through this but i did'nt get what to set in
File View Attribute,
File Name Override,
File MIME Type,
and View Attribute
Please Suggest
Best regardsThe information is there in the dev guide
File View Attribute - The view attribute that maps to the column that stores the file content.
File Name Override - The file name to save to when you select the File Download link and choose the Save option in the File Download window to save the file. The default file name that appears in the File Name field of the Save As dialog window is derived from the value returned from the view
attribute specified by the View Attribute property. The value of the File Name Override property overrides that default file name and is especially useful if the view attribute returns instructional text, such as "Click on this link to download the file". If the File Name Override property is not defined, then
the file name to save to is the value returned from the view attribute.
File MIME Type - The MIME type of the file. See the Runtime Control example below if you do not want to specify a static value for this property.
Data Type - The data type of the File View Attribute. The BLOB datatype is now supported for File Download as of OA Framework 11.5.10D. -
How to khow file was modified?
If I must use this file to configurate my application and how we check this file for make sure this the same file. Thank for any help.
If the config file is only used by your java program then checking the last modified date is ok. But if someone modifies the config file themselves using a text editor, then you got a problem.
Preventing someone from messing with a config file is not a simple problem to solve. There are many techniques one can use but all have their faults.
One idea is encrypting the file with a long key. Of course that key has to be stored in your program and someone might be able to decompile your program and extract that key.
But it's only a config file, not some secret doc.
-Nick -
How to increase file size on solaris 10 from 2g
HI All,
how can i increase the file size on solaris 10 from 2gb .
please reply complete steps.
or any helpful tutorials
thanksfiles (log files ) are being created by application and max size for the files is "2147483647" and that restriction i cant get complete logs so how can i increase the file size ?
Q) What filesystem are you using?
A) UFS
Q) What Kernel release are you using? (uname -a)
A) SunOS ss00 5.10 Generic_120012-14 i86pc i386 i86pc
Q) What system are you running Solaris on? (prtdiag -v | head)
A) System Configuration: Sun Microsystems Sun Fire V20z
BIOS Configuration: Phoenix Technologies Ltd. V1.34.4.2 08/24/2005
BMC Configuration: IPMI 1.5 (KCS: Keyboard Controller Style)
==== Processor Sockets ====================================
Version Location Tag
AMD CPU0-Socket 940
AMD CPU1-Socket 940
Q) Are you running a 32-bit or 64-bit Kernel? (isainfo -v)
A) 64-bit amd64 applications
sse2 sse fxsr amd_3dnowx amd_3dnow amd_mmx mmx cmov amd_sysc cx8 tsc
fpu
32-bit i386 applications
sse2 sse fxsr amd_3dnowx amd_3dnow amd_mmx mmx cmov amd_sysc cx8 tsc
fpu
Q) How is the file being modified or created?
A) files are being created by application
Can you create a 3GB file using mkfile(1M) - # mkfile 3g 3gfile
A) 3221225472 Jun 8 05:31 3gfile yes file was created successfully -
How to implement a view or access implementation file in webDynpro?
Hello,
I'm actually working on developping a simple component with webDynpro, enabling user to fill two inputfields and send the answers by clicking on a button. The problem is when i'm trying to open the view with java editor, i get the error:
"The implementation file for ...View was not found and the implementation editor could not be opened" plus possible explanations for the problem not very helpful. I thought that when i'm adding methods and events, there is a file that is generated. And if not, how will i implement my methods?
Cheers.Hi,
Assuming your installation of the NWDS was successfull.
You can right click on your project and select repair class path and project structure.
If this doesnt help, try to create a new project in different workspace.
Regards
Ayyapparaj -
How to implement a file system in my app?
How to implement a file system in my app? So that we can connect to my iPhone via Finder->Go->Connect to Server. And my iPhone will show as a shared disk. Any ideas about it? Thanks.
Hi Rain--
From webdav.org:
DAV-E is a WebDAV client for iPhone, with free and full versions. It provides remote file browsing via WebDAV, and can be used to upload pictures taken with the iPhone.
http://greenbytes.de/dav-e.html
http://www.greenbytes.de/tech/webdav/
Hope this helps. -
How to implement reading data from a mat file on a cRIO?
Hi all!
I am not even sure, this is plausible, but I'd rather ask before i start complicating. So far, I have not found any helpful info about reading in data to a RT device from a file (kind of a simulation test - the data is simulated).
I have the MatLab plugin that allows the data storage read a MAT file, which has a number of colums representing different signals and lines representing the samples at a given time (based on the sample time - each sample time has it's own line of signal data).
I have no idea of how to implement this to cRIO.
The idea is:
I have some algorithms that run on the RIO controller in a timed loop. As the inputs to these algorithms, i would need to acces each of the columns values in the line, that corresponds to the sample time (kind of a time series - without the actual times written).
I am fairly new to RT and LV development, so any help would be much appreciated.
Thanks,
Luka
Solved!
Go to Solution.Hi Luka!
MAT file support in LabVIEW is handled by DataPlugins. Here you can find the MATLAb plugin:
http://zone.ni.com/devzone/cda/epd/p/id/4178
And here you can find information on how to use DataPlugins to read or write files of a certain format:
http://www.ni.com/white-paper/11951/en
There is also an open-source project that addresses the problem, you can find it at
http://matio-labview.sourceforge.net/
Unfortunately, RT systems are not supported by DataPlugins, so fist you'll have to write a VI on the Host computer to convert your files to a usable format (I suggest TMDS for compactness and ease of use), and the work on the converted files in the cRIO VI. If you have other questions about DataPlugins or anything else, please get back to me.
Best regards:
Andrew Valko
National Instruments
Andrew Valko
National Instruments Hungary -
How to implement select all files (Ctrl-A) in open file dialog??
I successfully created file open dialog. However, in most windows file open dialog,
if you press "Ctrl-A," it will select all the files in the directory. If you press "Ctrl"
key with arrow key, it will highligh the files you want. ie. It allows users to open
more than one files at the same time. How to implement it in Java??For doing this, you have to enable the file multiselection.
If you have created a JFileChooser as :
JFileChooser fileChooser = new JFileChooser();
Add the following statement to set the multiselection property.
fileChooser.setMultiSelectionEnabled(true);
Manish. -
How to implement search engine for pdf file.
Hi
I am newbie to AIR technolgy .how to implement search engine . when i enter the name of file in search box , it should fetch correspoding the pdf file .
Please help me out
Thanks
MohanHi sekhar,
Your Requirement can be implemented by OVS(Object Value selector) This is the custom search help .So that you can define on what basis the value has to be fetched.
Look at the below link
http://wiki.sdn.sap.com/wiki/display/WDABAP/ABAPWDObjectValueSelector(OVS)
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/606288d6-04c6-2c10-b5ae-a240304c88ea?quicklink=index&overridelayout=true
You need to use the component WDR_OVS.
It has 3 phases
In phase 1
You will fetch the value from input field to F4 help dialog box.
In phase 2
You will generate the search results , in this phase look for the input value given in field 2 and accordingly generate search result for the field 3.
In phase 3
The selected value will be returned to the original screen.
Regards
Karthiheyan M -
How to implement Comparator in Map
hi,
Can any one explain how to implement camparator interface in map. i want to sort the map by the values stored.
Thanks in advance.Holy Christ!
We are being overrun by double posting numbnuts today. -
How to get the lastmodified time of an existing file?
hi,
there are some files sitting at server side, I want to monitor when the file is modified. could anyone show me some code for doing this?
Thanks!
Euncieimport java.io.*;
import java.util.Date;
class LastModifiedDemo{
public static void main (String args[]){
File f = new File("test.txt");
System.out.println(new Date(f.lastModified()));
}well, you should not get zero, try this, you will get a date -
How to access file from AIX server to windows
HI all,
My question is how to represent file folder name of that server
my file folder in AIX server and i want to access that file in window s machine.
* is this the right way to represent the data folder in physical schema declaration
file:///<aix server IP>/usr/oracledi/oracldi/dataNo, it is not. Filename magic alone will not do the job.
AIX supports NFS (network file system) or you can use samba (implementation of the Microsoft SMB protocol to share resources in Un*x) . -
How to integrate File Server with Portal??
Hi all,
can any one tell me that how interegate the File Server With Portal Server??
In my portal server under home tab i have sub tab (second level navigation) of File server.Whe i click this tab it throws an syntax error
ie
System Error
An exception occurred during the program execution. Below you will find technical information pertaining to this exception that you might want to forward to your system administrator.
Exception Class :: class com.sapportals.wcm.repository.NotSupportedException
Exception Message :: Not Implemented
thease are the steps that i have taken
>created HTTP System..
>created WebDAV Repository.
>Created Cache.
>Created KM WebDAV System.
>Created Iview and in iview i have to specify the <b>Path to Initially Displayed Folder</b>
i have specified the folder of file server that i want to display..
but i get the same syntax error ..
infact i dint get that folder in KM.
But when i specify the folder that is present in KM its Work fine..
Now the Scnerio According to me is that File server is not integrated properly
if it would be integrated properly i would be able to see the folder of File server in KM...
am i correct ??
please Guide me to integrated the File Server Properly??
Points will be given for any help..
Regards
VinitHi Vinit,
if you want some Windows File Server integrated into Portal, please do not use a WebDAV Repository, but use the File System Repository instead. Therefore you need to configure the according Repository Manager. Please refer to this documentation:
<a href="http://help.sap.com/saphelp_nw70/helpdata/en/ed/b334ea02a2704388d1d2fc3e4298ad/frameset.htm">Integrating Documents from a Windows System into KM</a>
HTH,
Carsten
Maybe you are looking for
-
Hi, User is not able to post an invoice after he parked the invoice. I have cheked the entry, where in document shows that it balanced to zero, but we could see only two line items, one is for 100 another one is for 79 which is not actually getting z
-
Where are ringtones iPhone 4 ios5
Hello everyone. I'm looking for guidence here in the Apple community. Seems I have an issue with ringtones as part of the update party yesterday. Hardware: iPhone 4 w/ ios5 Macbook pro w/ 10.7.2 iTunes 10.5 Ringtones have bben purchased for apple. Ev
-
Been having an issue with multiple computers using Creative Cloud. After rendering the project all the media goes offline. I have to restart Premiere to get media back. Any thoughts?
-
Time Machine cannot find NAS drive since Lion install
I've been very successfully using a Buffalo NAS drive to backup using Time Machine in Snow Leopard, but since 'upgrading' to Lion I just cannot get TM to see the NAS drive. I can see the drive in Finder, and it's listed as a share, but each time I t
-
voice service voip allow-connections h323 to h323 allow-connections h323 to sip allow-connections sip to h323 allow-connections sip to sip no supplementary-service sip moved-temporarily fax protocol t38 version 0 ls-redundancy 0 hs-redundancy 0